$abs

From Scriptwiki
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