Abs

From WikiManual
Revision as of 17:06, 3 October 2005 by Numsgil (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Absolute Value UNARY

Returns the absolute value of the top value on the stack. Absolute value is defined as:

x abs

is

x if x >= 0
-x if x < 0