Namespace: Math

utilx. Math

utilx.Math
Source:

Methods

(static) sign(value) → {number}

The function returns the sign of a number, indicating whether the number is positive, negative or zero. This function has 5 kinds of return values, 1, -1, 0, -0, NaN, which represent "positive number", "negative number", "positive zero", "negative zero" and NaN respectively.
Parameters:
Name Type Description
value *
Source:
Returns:
Type
number