correctly preserve total arc angle during normalize

This commit is contained in:
jan 2017-04-20 13:01:31 -07:00
parent 2c159f2798
commit 434178c853

View File

@ -265,11 +265,14 @@ class Arc(Shape):
rotation = self.rotation + pi / 2
angles = self.angles - pi / 2
if angles[0] >= pi:
angles -= pi
delta_angle = angles[1] - angles[0]
start_angle = angles[0] % (2 * pi)
if start_angle >= pi:
start_angle -= pi
rotation += pi
angles %= 2 * pi
angles %= (start_angle, start_angle + delta_angle)
rotation %= 2 * pi
width = self.width