Rev Language Reference


floor - The floor function.

Rounds a number down to the nearest integer.

Usage

floor(Real x)

Arguments

x : Real (pass by const reference)
The value.

Return Type

Details

The floor function takes as input a real number x, and gives as output the greatest integer less than or equal to x.

Example

x <- 2.4
floor(x) # returns 2

y <- -2.4
floor(y) # returns -3

See Also