Function: Floor
Floor (
NUMBER
)
Returns the mathematical floor of a value.
Parameters
Parameter |
Type |
Description |
NUMBER |
VALUE(FLOAT) |
The input value. |
Returns
VALUE(FLOAT) |
The mathematical floor of the input value. |
What It Does
This function takes a numeric value and returns the mathematical floor of it: a whole number that is the
minimum of the two nearest whole numbers. The input value is interpreted as a floating-point number.
a = floor(1.25); // a = 1.0
a = floor(1.875); // a = 1.0
a = floor(1.0); // a = 1.0
a = floor(-1.25); // a = -2.0
a = floor("1.25"); // a = 1.0