linebender / kurbo

A Rust library for manipulating curves
Apache License 2.0
697 stars 67 forks source link

Fix edge case for `mindist` #334

Closed platlas closed 2 months ago

platlas commented 7 months ago

This is fix for https://github.com/linebender/kurbo/issues/218.

Depends on orientation of curves, function fails if curves have different order. Check, detecting end-points as closest points, returns false positives here. This is caused by small typo in implementation where check takes order of first curve instead of order from second curve.

PR consist of test case from https://github.com/linebender/kurbo/issues/218 and replacement of n order to m in that specific check.