Function aabb2::expand_vector [] [src]

pub fn expand_vector<'out, 'a, 'b, T>(
    out: &'out mut AABB2<T>,
    aabb2: &'a AABB2<T>,
    v: &'b [T; 2]
) -> &'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], [1, 1]);
assert_eq!(
    aabb2::expand_vector(&mut a, &b, &[1, 1]),
    &AABB2{ min: [-2, -2], max: [2, 2] }
);