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...)
 
m (Conversion script moved page Macros:Functions:ceil to macros:Functions:ceil: Converting page titles to lowercase)
 
(2 intermediate revisions by 2 users not shown)
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.

Latest revision as of 23:59, 9 February 2023

Redirect to: