Cross Product

The cross product, \(\mathbf{u} \times \mathbf{v}\), is defined as,

\[ \mathbf{u} \times \mathbf{v} = |\mathbf{u}||\mathbf{v}| \sin(\theta)\]
function ×(u::Vector, v::Vector)
    @assert length(u) == length(v) == 3
    Vector{eltype(u)}([
    	u[2]*v[3]-u[3]*v[2], 
    	u[3]*v[1]-u[1]*v[3], 
    	u[1]*v[2]-u[2]*v[1]
    ])
end

@show [1;0;0] × [0;1;0]
> [1; 0; 0] × [0; 1; 0] = [0, 0, 1]