abs: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
m (Conversion script moved page Abs to abs: Converting page titles to lowercase)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Function abs==
#REDIRECT [[absolutevalue]]
Returns the absolute value of a number. The absolute value of a number is the number without the sign.
[[Category:Macro Function]]
 
[[Category:Mathematical Function]]
===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.

Latest revision as of 22:53, 9 February 2023

Redirect to: