Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!

Math.sign

Math.sign($n)

Description

Returns 1 if positive, -1 if negative, or 0.

Math.sign(5);   //=  1 (positive)
Math.sign(-7);  //= -1 (negative)
Math.sign(0);   //=  0