Function kurbo::fit_to_cubic

source ·
pub fn fit_to_cubic(
    source: &impl ParamCurveFit,
    range: Range<f64>,
    accuracy: f64
) -> Option<(CubicBez, f64)>
Expand description

Fit a single cubic to a range of the source curve.

Returns the cubic segment and the square of the error. Discussion question: should this be a method on the trait instead?