Function continuous_aabb2_aabb2

Source
pub fn continuous_aabb2_aabb2<I>(a: &Aabb2<I>, b: &Aabb2<I>) -> Option<Aabb2<I>>
where I: Integer + Debug,
Expand description

Continuous intersection test of 2D axis-aligned bounding boxes.

Shared boundary points will return intersection:

let a = Aabb2::from_points ([ 0, 0].into(), [1, 1].into());
let b = Aabb2::from_points ([-1, 0].into(), [0, 1].into());
assert_eq!(
  continuous_aabb2_aabb2 (&a, &b).unwrap(),
  Aabb2::from_points ([0,0].into(), [0, 1].into()));