Category: Number function
This function rounds number up to the nearest integer - or full, non-fractional number - towards positive infinity.
Argument | Type | Description |
---|---|---|
number | Number | The value, usually fractional, to be rounded. |
Return value type: Number
If the argument provided has any decimal portion, the whole number will be rounded up (towards positive infinity) to the next nearest whole number.
ceiling(20.0001) //Returns 21
ceiling(20.5) //Returns 21
ceiling(20.9999) //Returns 21
ceiling(-20.0001) //Returns -20 (Rounded up towards positive infinity)
ceiling(-20.5) //Returns -20 (Rounded up towards positive infinity)
ceiling(-20.9999) //Returns -20 (Rounded up towards positive infinity)