jbuckmccready / cavalier_contours

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

fix: remove_redundant panics on polyline with equal points #26

Closed hhemul closed 1 year ago

hhemul commented 1 year ago

remove_redundant panics on polyline with equal points for example [(0, 0, 0), (0, 0, 0), (0, 0, 0)]

jbuckmccready commented 1 year ago

Thanks for the contribution! Looks good to me, just need to run cargo fmt on the files you changed and I think we should add a test case of a polyline with exactly 2 equal points to ensure no off by 1 bug regressions in the future (both the ones you added have 3).

jbuckmccready commented 1 year ago

Oh also should add a comment on the check and break/return lines added (why it checks and the case it covers).

jbuckmccready commented 1 year ago

I can work on these things tomorrow if you'd like.

jbuckmccready commented 1 year ago

Merged, thanks for the fix and changes!