Function vec2::inv_len [−][src]
pub fn inv_len<T>(v: &[T; 2]) -> T where
T: Real,
&'a T: Mul<&'b T, Output = T>,
Example
assert_eq!(vec2::inv_len::<f32>(&vec2::new_one()), 1_f32 / 2_f32.sqrt());
pub fn inv_len<T>(v: &[T; 2]) -> T where
T: Real,
&'a T: Mul<&'b T, Output = T>,
assert_eq!(vec2::inv_len::<f32>(&vec2::new_one()), 1_f32 / 2_f32.sqrt());