Skip to main content

continuous_segment2_aabb2

Function continuous_segment2_aabb2 

Source
pub fn continuous_segment2_aabb2<S>(
    segment: Segment2<S>,
    aabb: Aabb2<S>,
) -> Option<(Segment2Point<S>, Segment2Point<S>)>
where S: Real,
Expand description

Compute continuous intersection of a 2D line segment with a 2D AABB (rectangle).

The points are returned in the order given by the ordering of the points in the segment.

Note that a segment that is tangent to the AABB returns no intersection.