From 4eafe808fa001b3ba8a84b998ec29a06c47d8cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sun, 10 Jan 2016 11:50:47 +0100 Subject: [PATCH] Rename getEndDistanceSquared() to getSquaredLineLength() --- src/path/Curve.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/Curve.js b/src/path/Curve.js index 5af96b4c..5bca8002 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -1865,13 +1865,13 @@ new function() { // Scope for intersection using bezier fat-line clipping // might just have tiny handles within the geometric epsilon // distance, so we have to check for that too. - function getEndDistanceSquared(v) { + function getSquaredLineLength(v) { var x = v[6] - v[0], y = v[7] - v[1]; return x * x + y * y; } - var flip = getEndDistanceSquared(v1) < getEndDistanceSquared(v2), + var flip = getSquaredLineLength(v1) < getSquaredLineLength(v2), l1 = flip ? v2 : v1, l2 = flip ? v1 : v2, line = new Line(l1[0], l1[1], l1[6], l1[7]);