pub trait Cross<Rhs> { type Output; fn cross(self, rhs: Rhs) -> Self::Output; }
Returns the cross product of a 3- or 7-dimensional vector pair.
A×B
rhs
let a = [1.0, 0.0, 0.0]; let b = [0.0, 1.0, 0.0]; let ab = [0.0, 0.0, 1.0]; assert_eq!(a.cross(b), ab);