Function aabb3::expand_vector[][src]

pub fn expand_vector<'out, T>(
    out: &'out mut AABB3<T>,
    aabb3: &AABB3<T>,
    v: &[T; 3]
) -> &'out mut AABB3<T> where
    T: PartialOrd,
    &'a T: Add<&'b T, Output = T> + Sub<&'b T, Output = T>, 

Examples

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