Sgn()
- Last UpdatedJul 13, 2023
- 1 minute read
Determines the sign of a value (whether it is positive, zero, or negative) and returns the result.
Category
Math
Syntax
IntegerResult = Sgn( Number );
Parameter
Number
Any number or numeric equipment.item.
Return Value
If the input number is positive, the result is 1. Negative numbers return a -1, and 0 returns a 0.
Examples
Sgn(425); ' returns 1;
Sgn(0); ' returns 0;
Sgn(-37.3); ' returns -1;