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

Fix GetPosition's interpolation to properly handle the angular part. Fixes #331 #332

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

ninnghazad
Copy link
Contributor

#331
Angles weren't properly interpolated, allowing for weird behavior when interpolating close to +PI / -PI.

@ninnghazad ninnghazad changed the title Fix GetPosition's interpolation to properly handle the angular part. #331 Fix GetPosition's interpolation to properly handle the angular part. Fixes #331 Jul 3, 2019
@ninnghazad
Copy link
Contributor Author

ninnghazad commented Jul 3, 2019

Hm, i guess it is to be expected for the tests to fail now.
Apart from adjusting the existing tests, i should probably add a new one specifically for the case of -Pi/+Pi to prevent regression.
Test to be fixed:

  • Sweep.GetPosition
  • Sweep.Advance
  • TimeOfImpact.RodCircleMissAt360
  • TimeOfImpact.RodCircleHitAt180
  • World_Longer.TilesComesToRest

@ninnghazad
Copy link
Contributor Author

Added a new test for that case, however i had to adjust some of the magic numbers - and there seem to be a lot others left for fixed formats and different compiler options. Not sure how to produce all of these even.

@ninnghazad
Copy link
Contributor Author

Apparently clang can't constexpr floor. So there's that also.

@louis-langholtz louis-langholtz self-assigned this Aug 4, 2019
@louis-langholtz louis-langholtz added the Enhancement For suggestions or changes that enhance any part of the project and isn't a bug. label Aug 18, 2019
@louis-langholtz louis-langholtz added the Bug For issues or changes that describe or fix bugs. label Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For issues or changes that describe or fix bugs. Enhancement For suggestions or changes that enhance any part of the project and isn't a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants