$abs

From Scriptwiki
Revision as of 13:04, 10 November 2005 by Albie (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns the absolute value for N.

$abs(N)
  • N is the number you want the absolute value of.
  • An absolute value is the distance a value has from zero. The same effect as multiplaying all negative numbers by -1.

Examples

$abs(6)    ;; Returns 6
$abs(-9)   ;; Returns 9
$abs(1.5)  ;; Returns 1.5
$abs(-6.9) ;; Returns 6.9