absolutevalue: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Redirecting to Macros:Functions:abs)
 
No edit summary
Line 1: Line 1:
#REDIRECT [[Macros:Functions:abs]]
{{MacroFunction
|name=abs
|description=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: val = abs(num)]
[h: val = absolutevalue(num)]
</source>
 
|examples=
<source lang="mtmacro" line>
[r: abs(-3)]
</source>
Returns 3.
 
<source lang="mtmacro" line>
[r: abs(4)]
</source>
Returns 4.
 
}}
[[Category:Mathematical Function]]

Revision as of 21:53, 6 March 2009

abs() Function

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

Usage

[h: val = abs(num)]
[h: val = absolutevalue(num)]

Examples

[r: abs(-3)]

Returns 3.

[r: abs(4)]
Returns 4.