absolutevalue: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Languages|absolutevalue}}
{{MacroFunction
{{MacroFunction
|name=absolutevalue
|name=absolutevalue
Line 35: Line 36:
}}
}}
[[Category:Mathematical Function]]
[[Category:Mathematical Function]]
{{Languages|absolutevalue}}

Revision as of 12:44, 31 July 2021

Languages:  English  • 日本語  • 한국어


absolutevalue() Function

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

Usage

[h: val = absolutevalue(num)]

You can use the following shorthand for this function:

[h: val = abs(num)]

Examples

====Negative Number====
[r: absolutevalue(-3)]
Returns:
3


Positive Number

[r: abs(4)]
Returns:
4


Decimal Number

[r: abs(3.4)]
Returns:
3.4

Languages:  English  • 日本語  • 한국어