Skip to content

Commit

Permalink
Fix regression introduced in 9339b29.
Browse files Browse the repository at this point in the history
`math.cos()` expects an angle in radians. The tolerance property is in
degrees.
  • Loading branch information
Hoikas committed Jan 18, 2024
1 parent 5a5b9ff commit dfa3bc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion korman/nodes/node_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def convert_subcondition(self, exporter, bo, so, logicmod: Union[plLogicModifier
node = self.links[0].from_node
directional = node.directional
moving_forward = node.moving_forward
tolerance = math.cos(node.tolerance)
tolerance = math.cos(math.radians(node.tolerance))
else:
# This is a programmer failure, so we need a traceback.
raise RuntimeError("Tried to export an unused PlasmaFacingTargetSocket")
Expand Down

0 comments on commit dfa3bc9

Please sign in to comment.