cross_product
ABSTRACT
Calculates the cross product between u and v. If both vectors are of dimension 2, this returns the z component of the cross product between u and v as if u and v were to live in the third dimension with z component zero. Otherwise, this returns a 3-vector according to the standard definition of a cross product. In some countries, the cross product is known as the vector product.
PARAMETERS
u | a vector of numbers of dimension 2 or 3 |
v | a vector of numbers with the same length as u |
RETURN
the cross product between u and v
DECLARATION
func cross_product(u,v)