From ebdc63fbfa744b8059a7133cbccd28cac94e825f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 8 Nov 2014 17:16:22 -0800 Subject: [PATCH] Use correct formula in Curve#getTangentAt() for end-points when there is no handle. Closes #553. --- 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 2b45f67b..57b539b8 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -520,8 +520,8 @@ statics: { // http://stackoverflow.com/questions/10506868/ if (t < tolerance && c1x === p1x && c1y === p1y || t > 1 - tolerance && c2x === p2x && c2y === p2y) { - x = p2x - p1x; - y = p2y - p1y; + x = c2x - c1x; + y = c2y - c1y; } else if (t < tolerance) { x = cx; y = cy;