Skip to content

Commit

Permalink
Revert "sum absolute angle values ref #14256"
Browse files Browse the repository at this point in the history
This reverts commit f8d160c.
  • Loading branch information
m-kro committed Jan 24, 2024
1 parent f8d160c commit 26ced8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/sumolib/geomhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ def isWithin(pos, shape):
for i in range(0, len(shape) - 1):
p1 = ((shape[i][0] - pos[0]), (shape[i][1] - pos[1]))
p2 = ((shape[i + 1][0] - pos[0]), (shape[i + 1][1] - pos[1]))
angle += math.fabs(angle2D(p1, p2))
angle = angle + angle2D(p1, p2)
i = len(shape) - 1
p1 = ((shape[i][0] - pos[0]), (shape[i][1] - pos[1]))
p2 = ((shape[0][0] - pos[0]), (shape[0][1] - pos[1]))
angle += math.fabs(angle2D(p1, p2))
return angle >= math.pi
angle = angle + angle2D(p1, p2)
return math.fabs(angle) >= math.pi


def sideOffset(fromPos, toPos, amount):
Expand Down

0 comments on commit 26ced8a

Please sign in to comment.