floor
To round down a given number to the nearest integer
With this function, you can round down a decimal number to the next lower integer. Existing decimal places are removed.
If an integer is already passed as a parameter, it remains unchanged.
Syntax
floor(number)
Return
number
Examples
Result: 2
Result: 12
Result: 27
See also
ceil
, which rounds up a given number to the next higher integer.
round
, which rounds a given number to the nearest integer.
Last updated