discrete_interval

Function discrete_interval 

Source
pub fn discrete_interval<S: OrderedRing>(
    a: &Interval<S>,
    b: &Interval<S>,
) -> bool
Expand description

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

AABBs that are merely touching are not counted as intersecting:

let a = Interval::from_points ( 0.0, 1.0);
let b = Interval::from_points (-1.0, 0.0);
assert!(!discrete_interval (&a, &b));