Function aabb2::union
[−]
[src]
pub fn union<'out, 'a, 'b, T>(
out: &'out mut AABB2<T>,
a: &'a AABB2<T>,
b: &'b AABB2<T>
) -> &'out mut AABB2<T> where
T: Copy + Num,
Examples
use aabb2::{self, AABB2}; let mut a = aabb2::new_identity(); let b = aabb2::new([-1, -1], [0, 0]); let c = aabb2::new([0, 0], [1, 1]); assert_eq!( aabb2::union(&mut a, &b, &c), &AABB2{ min: [-1, -1], max: [1, 1] } );