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