syntax:functions:floor
Table of Contents
Floor(number)
Category: Number function
Description
This function rounds number down to the nearest integer - or full, non-fractional number - towards negative infinity.
Arguments
Argument | Type | Description |
---|---|---|
number | Number | The value, usually fractional, to be rounded. |
Return value type: Number
Remarks
If the argument provided has any decimal portion, the whole number will be rounded down (towards negative infinity) to the next nearest whole number.
Examples
floor(10.0001) //Returns 10
floor(10.5) //Returns 10
floor(10.9999) //Returns 10
floor(-10.0001) //Returns -11 (Rounded down towards negative infinity)
floor(-10.5) //Returns -11 (Rounded down towards negative infinity)
floor(-10.9999) //Returns -11 (Rounded down towards negative infinity)
See also
syntax/functions/floor.txt · Last modified: 2021/08/11 15:17 by craigt