From c48cdc7c70dbeb509b1c85d5d6b84f69e5f7a43a Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 23 Dec 2016 12:22:48 -0500 Subject: [PATCH] Clearer intent for right triangle code --- modules/actions/orthogonalize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/actions/orthogonalize.js b/modules/actions/orthogonalize.js index 5426e04bd..31c532d00 100644 --- a/modules/actions/orthogonalize.js +++ b/modules/actions/orthogonalize.js @@ -22,7 +22,7 @@ export function actionOrthogonalize(wayId, projection) { epsilon = 1e-4, node, loc, score, motions, i, j; - if (nodes.length === 4) { + if (points.length === 3) { // move only one vertex for right triangle for (i = 0; i < 1000; i++) { motions = points.map(calcMotion); points[corner.i] = addPoints(points[corner.i], motions[corner.i]);