sign Function

The sign function returns -1 if the given value is negative, 1 if the value is positive, and 0 if the value is equal to 0.

Syntax:

  sign(value)