pub(crate) fn bezier(t: f64, x1: f64, y1: f64, x2: f64, y2: f64) -> f64Expand description
A cubic bezier from (0,0) to (1,1), evaluated at t along the x axis.
The curve is parametric, so a y for a given x needs the parameter that puts x there. Newton’s method converges in a couple of steps for the well-behaved curves easings are, and bisection finishes the rest – the same approach browsers take, for the same reason.