Function discrete_interval

Source
pub fn discrete_interval<I>(a: &Interval<I>, b: &Interval<I>) -> bool
where I: Integer,
Expand description

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

Shared boundary points will return intersection:

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