Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bake_route fixes #119

Merged
merged 2 commits into from
Aug 31, 2021
Merged

Conversation

DasCapschen
Copy link
Member

Sometimes, bake_route() would not detect rails that should be connected.
Example:

currentrot = -180
rail.startrot = 179.999985
Math.normDeg(currentrot) = 180
Math.normDeg(rail.startrot) = 539.999985
abs(Math.normDeg(currentrot) - abs(Math.normDeg(rail.startrot))): 359.999985

The expected distance is 0.000015, because 180 and -180 are infact the same angle. But this was handled incorrectly.

@Jean28518 Jean28518 merged commit bced892 into Libre-TrainSim:master Aug 31, 2021
@DasCapschen DasCapschen deleted the bake_rail_fixes branch September 2, 2021 10:09
@nalquas nalquas added the bug Something isn't working label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants