From b11edddf68ba999350fdf9a729b457c1fe7b75e3 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Fri, 13 May 2016 15:35:33 -0400 Subject: [PATCH] Fix jshint. --- src/rectangle.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rectangle.js b/src/rectangle.js index 3f04afc6..98c839de 100644 --- a/src/rectangle.js +++ b/src/rectangle.js @@ -366,10 +366,10 @@ $.Rect.prototype = { var thisSegment = thisSegments[i]; for (var j = 0; j < rectSegments.length; j++) { var rectSegment = rectSegments[j]; - var point = getIntersection(thisSegment[0], thisSegment[1], + var intersect = getIntersection(thisSegment[0], thisSegment[1], rectSegment[0], rectSegment[1]); - if (point) { - intersectionPoints.push(point); + if (intersect) { + intersectionPoints.push(intersect); } } } @@ -403,8 +403,8 @@ $.Rect.prototype = { var maxX = intersectionPoints[0].x; var minY = intersectionPoints[0].y; var maxY = intersectionPoints[0].y; - for (var i = 1; i < intersectionPoints.length; i++) { - var point = intersectionPoints[i]; + for (var k = 1; k < intersectionPoints.length; k++) { + var point = intersectionPoints[k]; if (point.x < minX) { minX = point.x; }