ceiling: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Redirecting to Macros:Functions:ceil)
 
No edit summary
Line 1: Line 1:
#REDIRECT [[Macros:Functions:ceil]]
{{MacroFunction
|name=ceiling
|description=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.
}}
[[Category:Mathematical Function]]

Revision as of 23:42, 6 March 2009

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.