macros:Functions:ceil

From RPTools Wiki
Revision as of 13:13, 1 December 2008 by Craig (talk | contribs) (New page: ==Function ceil== 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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function ceil

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.