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