Skip to content

Commit de0ba88

Browse files
authored
Update BuildingShapeUtils.js
1 parent 92ec1b1 commit de0ba88

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
@@ -296,9 +296,9 @@ class BuildingShapeUtils extends ShapeUtils {
296296
angle = Math.atan2(p2.y - p1.y, p2.x - p1.x) - Math.atan2(p0.y - p1.y, p0.x - p1.x);
297297
angles.push(angle);
298298
}
299-
p0 = points[0];
299+
p0 = points[points.length - 2];
300300
p1 = points[points.length - 1];
301-
p2 = points[points.length - 2];
301+
p2 = points[0];
302302
angle = Math.atan2(p2.y - p1.y, p2.x - p1.x) - Math.atan2(p0.y - p1.y, p0.x - p1.x);
303303
angles.push(angle);
304304
return angles;

0 commit comments

Comments
 (0)