floor(var x): var

Rounds x down to the largest integer that is not greater than x; .

ceil(var x): var

Rounds x up to the smallest integer that is not smaller than x.

Parameters:

x - var to be rounded up or down.

Returns:

x rounded up or down.

Remarks:

Example:

int a = floor(b); 

See also:

round

► latest version online