Abs

From WikiManual
Revision as of 21:47, 23 December 2005 by Ollj (talk | contribs)
Jump to: navigation, search

Operators:

Basic Commands:

add & sub
mult & div
rnd
*
mod
sgn
abs

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