Returns the sign value of the given number (whose value is data). If data is greater than 0, it will return 1. If data is less than 0, it will return -1. If data is equal to 0, it will return 0.
Parameter
data - The value you want to know the sign of.
Return value
1, 0 or -1.
Examples
sgn(2) - Returns 1.sgn(-23) - Returns -1.sgn(0) - Returns 0.