max(x,y)

Berechnet das Maximum von x und y.

Parameter:

x, y - beliebige Zahlen.

Rückgabewert:

x > y, dann x
y > x, dann y

Geschwindigkeit:

Schnell

Beispiel:

x = max(8, 5);	// x ist jetzt 8
x = max(2,2);		// x ist jetzt 2 
x = max(-5,10);	// x ist jetzt 10 
x = max(10, x); // x kann nicht kleiner als 10 werden
x = max(0, ( min(x, 10) )) // x wird auf Werte zwischen 0 und 10 begrenzt

Siehe auch:

min

► Aktuelle Version Online