mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 13:08:07 -06:00
- accept only four-element arrays for bezier(): extra values make the curve malformed, so it falls back to linear like the other invalid forms (#1884); - stop Newton on the estimated y error (f * dy/dx) instead of a residual in x alone: near the endpoints dy/dx is in the thousands, so a 1e-9 residual in x could still move the returned value; - tests: a five-element curve is linear, and three steep curves match a bisection reference within 1e-6.