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