signum

Returns the sign of a double value.

  • -0.0 if the value is considered zero and negatively signed,

  • +0.0 if the value is considered zero and positively signed,

  • -1.0 if the value is considered less than zero,

  • +1.0 if the value is considered greater than zero.

Return

-1.0 if a is negative, 0.0 if a is zero, and 1.0 if a is positive.

Parameters

a

The double value to check.