Pomax / bezierjs

A nodejs and client-side library for (cubic) Bezier curve work
MIT License
1.7k stars 230 forks source link

`.split(0, 0)` returns `left` and `right` curves #177

Open orange4glace opened 2 years ago

orange4glace commented 2 years ago

First, thanks for the great library! This is awesome :> It helps me a lot.

.split(0, 0) returns what .split(0) returns, which has left and right curves. I think .split(0, 0) should return single curve with zero length since it explicitly splits between 0 and 0.

Pomax commented 2 years ago

Hmm, good point, But I'd probably make split(a,b) throw on a===b instead, as there isn't anything to return in that case, so whatever code is getting invoked almost certainly has a bug.