Sign()

Summary

Computes the sign of a number.

Syntax

sgn = Sign(real value)

Argument Contents
value Any number

Returns

-1 if value is less than zero, 1 if value is greater than zero, 0 if value is equal to zero.

Example

y = Sign(x) * Abs(y) // Changes y to have the same sign as x

See Also

Function Summary
Abs() Computes the absolute value of a number