signum()

Returns the signum function of the value; zero if the value is zero, 1.0 if the value is greater than zero, -1.0 if the value is less than zero.

Syntax

signum()

Usage

Special cases:
  • If the value is NaN, then the result is NaN.
  • If the value is positive zero or negative zero, then the result is the same as the value.