Function aabb2::expand_scalar [−][src]
pub fn expand_scalar<'out, T>(
out: &'out mut AABB2<T>,
aabb2: &AABB2<T>,
s: &T
) -> &'out mut AABB2<T> where
&'a T: Add<&'b T, Output = T> + Sub<&'b T, Output = T>,
Examples
use aabb2::{self, AABB2}; let mut a = aabb2::new_identity(); let b = aabb2::new([-1.0, -1.0], [1.0, 1.0]); assert_eq!( aabb2::expand_scalar(&mut a, &b, &1.0), &AABB2{ min: [-2.0, -2.0], max: [2.0, 2.0] } );