min(int x, int y): int

min(var x, var y): var

max(int x, int y): int

max(var x, var y): var

Returns the minimum or maximum of x and y.


x,y - any var or int.


The minimum or maximum of x and y.


The returned variable type depends on the type of the arguments; for constants use a decimal point to mark them as var (f.i. 1 is int, but 1. is var).


var x = max(0.,y); 

See also:

abs, between, ifelse, MinVal, MaxVal

► latest version online