min(int x, int y): int

min(var x, var y): var

max(int x, int y): int

max(var x, var y): var

The minimum or maximum of x and y.

Parameters:

x,y - any var or int.

Returns:

The minimum or maximum of x and y.

Remarks:

The returned variable type depends on the type of the arguments. Make sure that x and y are either both int or both var; for constants use a decimal point to define them as var (f.i. 1 = int, but 1. = var).

Example:

var x = max(0.,y); 

See also:

sqrt, abs

► latest version online