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

Reduce number of operations in Triangle::circumscribed_circle #390

Merged
merged 3 commits into from
Nov 25, 2024

Conversation

tomcur
Copy link
Member

@tomcur tomcur commented Oct 8, 2024

This is based on the simplified form for Cartesian coordinates in https://en.wikipedia.org/w/index.php?title=Circumcircle&oldid=1247179617#Cartesian_coordinates_2

Also adds a test to check the circle radius' sign is equal to the sign of the triangle's area.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, I think this can be committed after the rebase.

src/triangle.rs Outdated Show resolved Hide resolved
@tomcur tomcur force-pushed the simpler-circumcircle branch from 1e2b348 to cb23325 Compare October 31, 2024 10:29
@tomcur tomcur marked this pull request as ready for review October 31, 2024 10:39
Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

Sorry to let this slip between the cracks.

@tomcur tomcur enabled auto-merge November 25, 2024 14:25
@Philipp-M
Copy link
Contributor

Philipp-M commented Nov 25, 2024

(I think you need to rebase/merge main to trigger the formatting CI, possibly because something changed on main here, Github UI is not very helpful here...)

(On top of PR linebender#387, as I'm removing a method here that is still used
until that PR is merged. I'll keep this in draft until then.)

This is based on the simplified form for Cartesian coordinates in
https://en.wikipedia.org/w/index.php?title=Circumcircle&oldid=1247179617#Cartesian_coordinates_2

Also adds a test to check the circle radius' sign is equal to the sign
of the triangle's area.
@tomcur tomcur force-pushed the simpler-circumcircle branch from e721bac to dd9af02 Compare November 25, 2024 14:44
@tomcur tomcur added this pull request to the merge queue Nov 25, 2024
Merged via the queue into linebender:main with commit dc50b30 Nov 25, 2024
15 checks passed
@tomcur tomcur deleted the simpler-circumcircle branch November 25, 2024 14:47
@tomcur
Copy link
Member Author

tomcur commented Nov 25, 2024

(I think you need to rebase/merge main to trigger the formatting CI, possibly because something changed on main here, Github UI is not very helpful here...)

(Yep, that triggered it. Thanks!)

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.

3 participants