Skip to content

Commit 9c5209d

Browse files
authored
Update BuildingShapeUtils.js
1 parent 0284b22 commit 9c5209d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,10 @@ class BuildingShapeUtils extends ShapeUtils {
356356
p1 = points[i];
357357
p2 = points[i + 1];
358358
let angle = Math.atan2((p2.y - p1.y), (p2.x - p1.x));
359-
if (angle >= Math.PI / 2) {
360-
angle -= Math.PI;
361-
} else if (angle < -Math.PI / 2) {
362-
angle += Math.PI;
359+
if (angle >= Math.PI) {
360+
angle -= 2 * Math.PI;
361+
} else if (angle < -Math.PI) {
362+
angle += 2* Math.PI;
363363
}
364364
angles.push(angle);
365365
}

0 commit comments

Comments
 (0)