Sgn (VBScript)

The Sgn command returns a number based on the sign of the numeric_expression.

If it is greater than zero then it returns 1, if it equals zero then it returns 0 and if it is less than zero it returns -1.

Syntax

SGN ( numeric_expression )