Abs

From MiniScript Wiki
Revision as of 03:56, 11 March 2020 by JoeStrout (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The abs function returns the absolute value of the given number.

Arguments

Parameter Name Default Value Meaning
x 0 number to take the absolute value of

Example

abs(-42)    // returns 42