pub trait Cross<Rhs> {
    type Output;

    fn cross(self, rhs: Rhs) -> Self::Output;
}

Required Associated Types§

Required Methods§

Returns the cross product of a 3- or 7-dimensional vector pair.

A×B

Arguments
  • rhs - Vector of same dimensions
Examples
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);

Implementations on Foreign Types§

Implementors§