From a627f41755aca192d27de3bcd5481fe8dd9a2e53 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 13 Jun 2012 08:16:22 +0200 Subject: [PATCH] fix Ox.sign(-0), should be 0, not -0 --- source/Ox/js/Math.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Ox/js/Math.js b/source/Ox/js/Math.js index 8b43d9ea..8ae31831 100644 --- a/source/Ox/js/Math.js +++ b/source/Ox/js/Math.js @@ -159,7 +159,7 @@ Ox.sign 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; }; /*@