ceiling

From RPTools Wiki
Revision as of 17:10, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "source>" to "syntaxhighlight>")
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

<source lang="mtmacro" line> [h: val = ceil(num)] [h: val = ceiling(num)] </syntaxhighlight>

Examples

<source lang="mtmacro" line>

[r: ceil(10)] </syntaxhighlight> Returns 10.

<source lang="mtmacro" line> [r: ceil(1.2)] </syntaxhighlight> Returns 2.

<source lang="mtmacro" line> [r: ceil(-1.2)] </syntaxhighlight>

Returns -1.