User Tools

Site Tools


syntax:functions:ceiling

This is an old revision of the document!


Ceiling(number)

Category: Number function


Description

This function rounds number up to the nearest integer - or full, non-fractional number - towards positive infinity.


Arguments

ArgumentTypeDescription
numberNumberThe 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 up (towards positive infinity) to the next nearest whole number.


Examples

ceiling(20.0001) = 21
ceiling(20.5) = 21
ceiling(20.9999) = 21
ceiling(-20.0001) = -20  //Rounded up towards positive infinity
ceiling(-20.5) = -20  //Rounded up towards positive infinity
ceiling(-20.9999) = -20  //Rounded up towards positive infinity


See also

syntax/functions/ceiling.1627776721.txt.gz · Last modified: 2021/07/31 20:12 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki