Skip to content

Commit 405482f

Browse files
authored
Update BuildingShapeUtils.js
1 parent 08164dc commit 405482f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,9 @@ class BuildingShapeUtils extends ShapeUtils {
293293
function calcAngle(p0, p1, p2) {
294294
let angle = Math.atan2(p2.y - p1.y, p2.x - p1.x) - Math.atan2(p0.y - p1.y, p0.x - p1.x);
295295
if (angle >= Math.PI) {
296-
angle -= Math.PI;
296+
angle -= 2 * Math.PI;
297297
} else if (angle < -Math.PI) {
298-
angle += Math.PI;
298+
angle += 2 * Math.PI;
299299
}
300300
return angle;
301301
}

0 commit comments

Comments
 (0)