Skip to content

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

Open
ninnghazad wants to merge 7 commits intolouis-langholtz:masterfrom
ninnghazad:fix-position-interpolation
Open

Fix GetPosition's interpolation to properly handle the angular part. Fixes #331#332
ninnghazad wants to merge 7 commits intolouis-langholtz:masterfrom
ninnghazad:fix-position-interpolation

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