-
Notifications
You must be signed in to change notification settings - Fork 270
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
Regression when removing type casting in IsCollinear() #831
Comments
Aaron, thank you for your very clear and concise bug report. |
Thanks. I should also clarify that I am using the C++ library. |
Can reproduce. Yeah, with these inputs (which are exactly ± |
This has been fixed in the latest repository revision. |
When updating to the latest revision of Clipper2, we encountered a regression due to #825 for removing the type casting in
IsCollinear()
.In this test case, we have four points that cross over in an hourglass shape. We call
Execute(Union, EvenOdd)
to "repair" this invalid polygon into a pair of triangles that touch at a point.These values, which are intended for single-precision floats, work as intended:
Input (with
AddSubject()
):Output (2 paths):
However, these values, which are intended for doubles, break with #825:
With the latest revision, the call to
Execute()
gives an empty result rather than two paths similar to the smaller integer values.The text was updated successfully, but these errors were encountered: