pub trait Dot<Rhs: Vector>: Vector { type Output; fn dot(self, rhs: Rhs) -> Self::Output; }
Returns the scalar dot product of two vector-arrays
u ⋅ v
rhs
let u = [1.0, 2.0, 3.0]; let v = [1.0, 2.0, 3.0]; let uv = 1.0 + 4.0 + 9.0; assert_eq!(u.dot(v), uv);