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 lerp accuracy issues #278

Closed
wants to merge 2 commits into from
Closed

Fix lerp accuracy issues #278

wants to merge 2 commits into from

Conversation

james7132
Copy link
Contributor

Fixes #275 using the proposed methodology.

Copy link
Owner

@bitshifter bitshifter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some comments on #275 - I would prefer to add an additional lerp_precise method than modify the existing lerp method. Primarily because the existing lerp method can be used to extrapolate and if people are using it that way this would break their code. A separate method means the precise option is there for those who need or want it.

Documentation would need to be added for the new and old methods explaining the difference.

It would also be good to add glam_assert checks to ensure t is in a valid range for the precise version.

@bitshifter
Copy link
Owner

No changes here for a while, closing for now.

@bitshifter bitshifter closed this Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lerp()'s implementation has a loss of precision when inputs span multiple orders of magnitude
2 participants