Function aabb3::union[][src]

pub fn union<'out, T>(
    out: &'out mut AABB3<T>,
    a: &AABB3<T>,
    b: &AABB3<T>
) -> &'out mut AABB3<T> where
    T: Clone + PartialOrd

Examples

use aabb3::{self, AABB3};
let mut a = aabb3::new_identity();
let b = aabb3::new([-1.0, -1.0, -1.0], [0.0, 0.0, 0.0]);
let c = aabb3::new([0.0, 0.0, 0.0], [1.0, 1.0, 1.0]);
assert_eq!(
    aabb3::union(&mut a, &b, &c),
    &AABB3{ min: [-1.0, -1.0, -1.0], max: [1.0, 1.0, 1.0] }
);