From a4a5afeb08fc21f3ef3b36ff83ec136cd0356a84 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Tue, 9 Jan 2018 15:42:30 +0100 Subject: [PATCH] formatting --- src/shape/shapeToPoints.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shape/shapeToPoints.js b/src/shape/shapeToPoints.js index 20cff6b..0795c4d 100644 --- a/src/shape/shapeToPoints.js +++ b/src/shape/shapeToPoints.js @@ -65,7 +65,7 @@ function shapeToPointsRaw(shapeData) { const points = []; let even = false; const numLines = rays * 2; - for (let i = 0, rad = 0; i <= numLines; i++, rad += Math.PI / rays) { + for (let i = 0, rad = 0; i <= numLines; i ++, rad += Math.PI / rays, even = !even) { if (i === numLines) { // last line? points.push(points[0].clone()); // go to first point } else { @@ -73,7 +73,6 @@ function shapeToPointsRaw(shapeData) { let x = Math.sin(rad) * radius; let y = -Math.cos(rad) * radius; points.push(new Vector(x, y)); - even = !even; } } shapes.push({ points, holes: [] });