Difference between revisions of "Sgn"

From WikiManual
Jump to: navigation, search
m
 
(2 intermediate revisions by one other user not shown)
Line 4: Line 4:
 
Sign Operator '''UNARY'''
 
Sign Operator '''UNARY'''
  
Returns the sign of the value on the stack.  1 if positive, -1 if negative. I do not remember what 0 returns.
+
Returns the sign of the value on the stack.  1 if positive, -1 if negative. 0 seems to return 0.

Latest revision as of 16:38, 18 October 2006

Operators:

Basic Commands:

add & sub
mult & div
rnd
*
mod
sgn
abs

Sign Operator UNARY

Returns the sign of the value on the stack. 1 if positive, -1 if negative. 0 seems to return 0.