Skip to main content

line_intersect

Function line_intersect 

Source
pub fn line_intersect(
    p0x: f64,
    p0y: f64,
    d0x: f64,
    d0y: f64,
    p1x: f64,
    p1y: f64,
    d1x: f64,
    d1y: f64,
) -> Option<(f64, f64, f64, f64)>
Expand description

Intersect p0 + t d0 with p1 + s d1.

Returns (t, s, ix, iy) or None when the directions are parallel.