Sgn

Top  Previous  Next

sgn(value)

 

Returns the sign of the value. Negative numbers return -1, positive numbers return 1 and zero return 0.

 

sgn(-25.36) = -1

sgn(3557.21) = 1

sgn(0) = 0