The number to determine the sign of.
The sign of the number: -1 if negative, 0 if zero, 1 if positive.
sign(-5); // Returns -1
sign(0); // Returns 0
sign(10); // Returns 1
Returns the sign of a bigint.
The bigint to determine the sign of.
The sign of the bigint: -1 if negative, 0 if zero, 1 if positive.
sign(-5n); // Returns -1
sign(0n); // Returns 0
sign(10n); // Returns 1
Generated using TypeDoc
Returns the sign of a number.