Skip to content

Commit

Permalink
Updated GetAngle calls to maintain compatibility with arc tracks and …
Browse files Browse the repository at this point in the history
…the new v7 API
  • Loading branch information
cantudo authored and NilujePerchut committed Feb 18, 2024
1 parent c4e0102 commit 92b5d70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions teardrops/td.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,12 @@ def __FindPositionAndVectorAlongArc(track, pos, trackReversed):
# startAngle, endAngle are the absolute start and end.
# angle is the included angle of the arc, negative if anticlockwise
if trackReversed:
angle = -track.GetAngle()
startAngle = track.GetArcAngleEnd()
angle = -track.GetAngle().AsTenthsOfADegree()
startAngle = track.GetArcAngleEnd().AsTenthsOfADegree()
else:
angle = track.GetAngle()
startAngle = track.GetArcAngleStart()
angle = track.GetAngle().AsTenthsOfADegree()
startAngle = track.GetArcAngleStart().AsTenthsOfADegree()


posAngle = startAngle + angle * pos/length

Expand Down

0 comments on commit 92b5d70

Please sign in to comment.