Function tiny_skia_path::path_geometry::solve_cubic_poly

source ยท
fn solve_cubic_poly(
    coeff: &[f32; 4],
    t_values: &mut [NormalizedF32; 3],
) -> usize
Expand description

Solve coeff(t) == 0, returning the number of roots that lie withing 0 < t < 1. coeff[0]t^3 + coeff[1]t^2 + coeff[2]t + coeff[3]

Eliminates repeated roots (so that all t_values are distinct, and are always in increasing order.