vec3:cross

Sets this vector to be equal to the cross product between this vector and another one. The new v will be perpendicular to both the old v and u.

v = vec3:cross(u)

Arguments

NameTypeDescription
uvec3The vector to compute the cross product with.

Returns

NameTypeDescription
vvec3The original vector, with the cross product as its values.

Notes

The vectors are not normalized before or after computing the cross product.

See also