Skip to main content

segment_intersection

Function segment_intersection 

Source
pub fn segment_intersection(
    p1: &Point2D,
    p2: &Point2D,
    p3: &Point2D,
    p4: &Point2D,
) -> Option<Point2D>
Expand description

Compute the intersection point of two segments (if they intersect). Returns None if they are parallel or do not intersect.