linebender / kurbo

A Rust library for manipulating curves
Apache License 2.0
727 stars 70 forks source link

Reduce number of operations in `Triangle::circumscribed_circle` #390

Closed tomcur closed 8 hours ago

tomcur commented 1 month ago

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.

Philipp-M commented 8 hours ago

(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...)

tomcur commented 8 hours ago

(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!)