diff --git a/src/path/Curve.js b/src/path/Curve.js index 90977dfe..aed9b659 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -670,7 +670,7 @@ statics: { h1 = new Point(v[2] - p1x, v[3] - p1y), h2 = new Point(v[4] - p2x, v[5] - p2y); return l.isZero() ? h1.isZero() && h2.isZero() - : l.isCollinear(h2) && l.isCollinear(h2); + : l.isCollinear(h1) && l.isCollinear(h2); }, isFlatEnough: function(v, tolerance) { diff --git a/src/path/Segment.js b/src/path/Segment.js index 21b16871..cb56c7a8 100644 --- a/src/path/Segment.js +++ b/src/path/Segment.js @@ -575,7 +575,7 @@ var Segment = Base.extend(/** @lends Segment# */{ h1 = seg1._handleOut, h2 = seg2._handleIn; return l.isZero() ? h1.isZero() && h2.isZero() - : l.isCollinear(h2) && l.isCollinear(h2); + : l.isCollinear(h1) && l.isCollinear(h2); }, isCollinear: function(seg1, seg2, seg3, seg4) {