jbuckmccready / cavalier_contours

2D polyline/shape library for offsetting, combining, etc.
Apache License 2.0
151 stars 13 forks source link

Fixed epsilon comparison in line_circle_intr for better accuracy #30

Closed jbuckmccready closed 1 year ago

jbuckmccready commented 1 year ago

Test case added which triggers debug assert that found the problem. This fixes one of the cases (case 2) reported in https://github.com/jbuckmccready/cavalier_contours/issues/27.

This applies to case where line is nearly vertical (p0.x - p1.x very close to 0).