From 5337655c472ca5d54065c979f9c8811bdfe8f250 Mon Sep 17 00:00:00 2001 From: yashdeep97 Date: Tue, 30 Jun 2020 03:47:57 +0530 Subject: [PATCH] Reduce epsilon. Fix #33 --- experiments/WebUI/src/components/content/MapComponent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/WebUI/src/components/content/MapComponent.js b/experiments/WebUI/src/components/content/MapComponent.js index edd71cf..fd95618 100644 --- a/experiments/WebUI/src/components/content/MapComponent.js +++ b/experiments/WebUI/src/components/content/MapComponent.js @@ -498,7 +498,7 @@ class MapComponent extends React.Component { checkCollinear(pointArray, point) { // epsilon accounts for the error in checking if a point is collinear. Larger epsilon will result in wider range of points getting accepted as collinear(even those that lie further from the line segment). - var epsilon = 0.000001; + var epsilon = 0.0000005; // check if the point lies between any 2 of the consecutive mission points. for (var i = 1; i < pointArray.length; i++) { var crossProduct = (point[1] - pointArray[i-1][1]) * (pointArray[i][0] - pointArray[i-1][0]) - (point[0] - pointArray[i-1][0]) * (pointArray[i][1] - pointArray[i-1][1]);