Skip to main content

barycentric

Function barycentric 

Source
pub fn barycentric(
    p: (f64, f64),
    a: (f64, f64),
    b: (f64, f64),
    c: (f64, f64),
) -> (f64, f64, f64)
Expand description

Barycentric coordinates of point p w.r.t. triangle (a, b, c). Returns (u, v, w) such that p = ua + vb + w*c.