min(x,y)

Berechnet das Minimum von x und y.

Parameter:

x, y - beliebige Zahlen.

Rückgabewert:

x < y, dann x
y < x, dann y

Geschwindigkeit:

Schnell

Beispiel:

x = min(8, 5); // x ist jetzt 5
x = min(2,2);	// x ist jetzt 2 
x = min(-5,10); // x ist jetzt -5 
x = min(10, x); // x kann nicht größer a werden
x = min(10,(max(x, 0))) // x wird auf Werte zwischen 0 und 10 begrenzt

Siehe auch:

max

► Aktuelle Version Online