Skip to content

Added tolerance for Color.lerp #3347

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

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

oddbookworm
Copy link
Member

Small little bug that plagued me while working on my free-threading stuff

@oddbookworm oddbookworm added the color pygame.color label Feb 24, 2025
@oddbookworm oddbookworm requested a review from a team as a code owner February 24, 2025 03:20
Copy link
Member

@damusss damusss left a comment

Choose a reason for hiding this comment

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

I was about to say to add something in the docs, but I guess the change is so small and not api-breaking so actually it's not necessary, LGTM!

Copy link
Contributor

@gresm gresm left a comment

Choose a reason for hiding this comment

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

LGTM, but alternatively we could just clamp the amount to the range.

@oddbookworm
Copy link
Member Author

LGTM, but alternatively we could just clamp the amount to the range.

That would be a behavior change that would be harder to justify. I don't see a compelling reason to clamp it beyond this tiny little bit, and rounding will take care of it anyway

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 🎉

@ankith26 ankith26 added this to the 2.5.4 milestone Feb 25, 2025
@ankith26 ankith26 merged commit 4b9ade9 into pygame-community:main Feb 25, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color pygame.color
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants