Skip to main content

line_segment_intersection

Function line_segment_intersection 

Source
pub fn line_segment_intersection(
    line1_start: Coords2d,
    line1_end: Coords2d,
    line2_start: Coords2d,
    line2_end: Coords2d,
    epsilon: f64,
) -> Option<Coords2d>
Expand description

Helper to calculate intersection point of two line segments

Returns the intersection point if segments intersect, None otherwise.