macros:Functions:ceil: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(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...)
 
(Redirecting to ceiling)
Line 1: Line 1:
==Function ceil==
#REDIRECT [[ceiling]]
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)]
</source>
 
===Examples===
<source lang="mtmacro" line>
[r: ceil(10)]
</source>
Returns 10.
 
<source lang="mtmacro" line>
[r: ceil(1.2)]
</source>
Returns 2.
 
<source lang="mtmacro" line>
[r: ceil(-1.2)]
</source>
Returns -1.

Revision as of 23:43, 6 March 2009

Redirect to: