Skip to main content

overlaps_interval

Function overlaps_interval 

Source
pub fn overlaps_interval<S>(a: Interval<S>, b: Interval<S>) -> bool
where S: Copy + PartialOrd,
Expand description

Overlap test of 1D axis-aligned bounding boxes (intervals).

AABBs that are merely touching are not counted as intersecting:

let a = Interval::with_minmax ( 0.0, 1.0).unwrap();
let b = Interval::with_minmax (-1.0, 0.0).unwrap();
assert!(!overlaps_interval (a, b));