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

[shapes] Fix CheckCollisionCircleRec() #3584

Merged
merged 1 commit into from Nov 30, 2023
Merged

[shapes] Fix CheckCollisionCircleRec() #3584

merged 1 commit into from Nov 30, 2023

Conversation

ghost
Copy link

@ghost ghost commented Nov 30, 2023

Changes

  • Fixes CheckCollisionCircleRec() by removing the casts to int and keeping all calculations as float (R2135-R2136, R2138-R2139).

Credit

Reference

Environment

  • Tested on Linux (Mint 21.1 64-bit).

Edits

  • 1: added line marks.

@raysan5 raysan5 merged commit e84099b into raysan5:master Nov 30, 2023
14 checks passed
@raysan5
Copy link
Owner

raysan5 commented Nov 30, 2023

@ubkp thanks again for the review! By the way, your PR notes are really professional, they keep me impressed. Congratulations!

@ghost ghost deleted the fix/shapes-collision branch November 30, 2023 16:47
@ghost
Copy link
Author

ghost commented Nov 30, 2023

@raysan5 Thank you! :)

I also would like to extend a special thank you to @Chaosed0 for the excellent issue and research, it was spot on!

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.

[rshapes] CheckCollisionCircleRec is inaccurate for very small rectangles
1 participant