Function vec3::norm [−][src]
pub fn norm<'out, T>(out: &'out mut [T; 3], b: &[T; 3]) -> T where
T: Real,
&'a T: Mul<&'b T, Output = T> + Div<&'b T, Output = T>,
Example
let mut v = vec3::new_one::<f32>(); assert_eq!(vec3::norm(&mut v, &vec3::new_one()), 3_f32.sqrt()); assert_eq!(v, [1_f32 / 3_f32.sqrt(); 3]);