ceiling

From RPTools Wiki
Revision as of 18:05, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ceiling() Function

Returns the number passed in if it is an integer, otherwise it returns the number rounded up to the next integer.

Usage

[h: val = ceil(num)]
[h: val = ceiling(num)]

Examples

[r: ceil(10)]

Returns 10.

[r: ceil(1.2)]

Returns 2.

[r: ceil(-1.2)]
Returns -1.