fix Ox.sign(-0), should be 0, not -0

This commit is contained in:
rolux 2012-06-13 08:16:22 +02:00
parent 8df96dd8fb
commit a627f41755

View file

@ -159,7 +159,7 @@ Ox.sign <f> Returns the sign of a number (-1, 0 or 1)
1 1
@*/ @*/
Ox.sign = function(x) { Ox.sign = function(x) {
return x !== x || x === 0 ? x : x < 0 ? -1 : 1; return x !== x || x === 0 ? +x : x < 0 ? -1 : 1;
}; };
/*@ /*@