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

Added tests for remaining untested Circle methods: Intersect(), Intersects(). #22

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

ts-practicon
Copy link
Contributor

Added the missing tests per #14. There's a small bug in Circle.Intersects(), if you test a circle against itself (or one with the same centre and radius), it'll return intersection points of [(NaN, NaN), (NaN, NaN)] because we're dividing by zero. Not sure how you want to handle it so I've left it alone.

@Timmoth
Copy link
Owner

Timmoth commented Jun 18, 2024

Thanks for the PR Tom!

WRT circle overlap, it's an interesting case - I think it should return false, since there are no points of intersection.

@Timmoth Timmoth enabled auto-merge June 18, 2024 14:34
@Timmoth Timmoth merged commit f4d686b into Timmoth:main Jun 18, 2024
2 checks passed
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.

2 participants