Function aabb2::from_center_radius [] [src]

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

Examples

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