fix Ox.sign(-0), should be 0, not -0
This commit is contained in:
parent
8df96dd8fb
commit
a627f41755
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ Ox.sign <f> Returns the sign of a number (-1, 0 or 1)
|
|||
1
|
||||
@*/
|
||||
Ox.sign = function(x) {
|
||||
return x !== x || x === 0 ? x : x < 0 ? -1 : 1;
|
||||
return x !== x || x === 0 ? +x : x < 0 ? -1 : 1;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
Loading…
Reference in a new issue