[ ] :pushpin: issue exists in github for these changes
[x] :microscope: existing tests still pass
[x] :see_no_evil: code conforms to the style guide
[x] :triangular_ruler: new tests written and passing / old tests updated with new scenario(s)
[x] :page_facing_up: changelog entry added (or not needed)
==================
Improves accuracy of PolygonPolygonClosestLine and ClosestLine functions. Big disclaimer, I heavily relied on ChatGPT for the math logic here... extra eyes greatly appreciated. I myself plan to do a deeper review on the math here before merging.
I also think there's a faster way to do the PolygonPolygonClosestLine logic. Right now it iterates over each side of the polygon, draws a line, and returns the shortest result. Potentially it could use SAT to determine the closest sides, but I had unexpected results
===:clipboard: PR Checklist :clipboard:===
==================
Improves accuracy of PolygonPolygonClosestLine and ClosestLine functions. Big disclaimer, I heavily relied on ChatGPT for the math logic here... extra eyes greatly appreciated. I myself plan to do a deeper review on the math here before merging.
Before:
https://github.com/user-attachments/assets/a0d9d5d5-76e9-4e05-8459-15b6a48b0dcb
After:
https://github.com/user-attachments/assets/85d4410b-2bf2-4f51-90e2-4ee828a9693b
I also think there's a faster way to do the
PolygonPolygonClosestLine
logic. Right now it iterates over each side of the polygon, draws a line, and returns the shortest result. Potentially it could use SAT to determine the closest sides, but I had unexpected resultshttps://github.com/user-attachments/assets/be6460cb-7786-4864-93aa-d8053478aa53