From 115ef45464416a6a9922294f09b0e15ae196ed31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 28 Apr 2011 13:13:33 +0100 Subject: [PATCH] Remove unnecessary .0 since numbers are all the same in JavaScript. --- src/basic/Point.js | 2 +- src/path/Path.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/basic/Point.js b/src/basic/Point.js index 10901f14..79ad441d 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -172,7 +172,7 @@ var Point = this.Point = Base.extend({ } } else { var scale = length / this.getLength(); - if (scale == 0.0) { + if (scale == 0) { // Calculate angle now, so it will be preserved even when // x and y are 0 this.getAngle(); diff --git a/src/path/Path.js b/src/path/Path.js index fc639e1a..97cff426 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -463,7 +463,7 @@ var Path = this.Path = PathItem.extend({ // Decomposition and forward substitution. for (var i = 1; i < n; i++) { tmp[i] = 1 / b; - b = (i < n - 1 ? 4.0 : 2.0) - tmp[i]; + b = (i < n - 1 ? 4 : 2) - tmp[i]; x[i] = (rhs[i] - x[i - 1]) / b; } // Back-substitution. @@ -718,7 +718,7 @@ var Path = this.Path = PathItem.extend({ diff -= Math.PI * 2; extent -= angle; - if (extent <= 0.0) + if (extent <= 0) extent += Math.PI * 2; if (diff < 0) extent = Math.PI * 2 - extent;