Function aabb3::from_center_radius [] [src]

pub fn from_center_radius<'out, 'a, T>(
    out: &'out mut AABB3<T>,
    center: &'a [T; 3],
    radius: T
) -> &'out mut AABB3<T> where
    T: Copy + Num

Examples

use aabb3::{self, AABB3};
let mut a = aabb3::new_identity();
assert_eq!(
    aabb3::from_center_radius(&mut a, &[0, 0, 0], 1),
    &aabb3::new([-1, -1, -1], [1, 1, 1])
);