abs: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function abs== Returns the absolute value of a number. The absolute value of a number is the number without the sign. ===Usage=== <source lang="mtmacro" line> [h: abs(number)] [h: absol...)
 
No edit summary
Line 5: Line 5:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: abs(number)]
[h: abs(number)]
[h: absolutevalue(number)]
[h: absolutevalue(num)]
</source>
</source>



Revision as of 12:25, 1 December 2008

Function abs

Returns the absolute value of a number. The absolute value of a number is the number without the sign.

Usage

[h: abs(number)]
[h: absolutevalue(num)]

Examples

[r: abs(-3)]

Returns 3.

[r: abs(4)]

Returns 4.