diff --git a/examples/Paperjs.org/SatieLikedToDraw.html b/examples/Paperjs.org/SatieLikedToDraw.html index d832ddb0..9c3e2850 100644 --- a/examples/Paperjs.org/SatieLikedToDraw.html +++ b/examples/Paperjs.org/SatieLikedToDraw.html @@ -128,7 +128,7 @@ sum += data[j]; } var avg = sum / (255 * (end - start)); - bands[i] = Math.sqrt(avg / Math.sqrt(2)); + bands[i] = Math.sqrt(avg / Math.SQRT2); } return bands; } diff --git a/examples/Tools/Vektor.html b/examples/Tools/Vektor.html index a8ab3f7d..8e678eba 100644 --- a/examples/Tools/Vektor.html +++ b/examples/Tools/Vektor.html @@ -126,7 +126,7 @@ var upVector = vector.normalize(lengthSize).rotate(45 * sign); var downVector = upVector.rotate(-90 * sign); var lengthVector = vector.normalize( - vector.length / 2 - lengthSize * Math.sqrt(2)); + vector.length / 2 - lengthSize * Math.SQRT2); var line = new Path(); line.add(from + awayVector); line.lineBy(upVector); diff --git a/test/tests/HitResult.js b/test/tests/HitResult.js index 4d4c2bb2..742d27ff 100644 --- a/test/tests/HitResult.js +++ b/test/tests/HitResult.js @@ -540,7 +540,7 @@ test('hit-testing fills with tolerance', function() { }); var tolerance = 10; - var point = path.bounds.bottomRight.add(tolerance / Math.sqrt(2)); + var point = path.bounds.bottomRight.add(tolerance / Math.SQRT2); equals(function() { var result = paper.project.hitTest(point, { diff --git a/test/tests/Point.js b/test/tests/Point.js index 4b75de97..41a5d1e6 100644 --- a/test/tests/Point.js +++ b/test/tests/Point.js @@ -88,12 +88,12 @@ test('set angle', function() { test('set angle & length', function() { var point1 = new Point(); - point1.length = Math.sqrt(2); + point1.length = Math.SQRT2; point1.angle = -45; var point2 = new Point(); point2.angle = -45; - point2.length = Math.sqrt(2); + point2.length = Math.SQRT2; equals(point2, point1); });