calculate the cross product of two vectors
vec3 cross(vec3 x, vec3 y)
x
: Specifies the first of two vectorsy
: Specifies the second of two vectorscross
returns the cross product of two vectors, x
and y
. i.e.,
$$
\begin{pmatrix} x[1] \cdot y[2] - y[1] \cdot x[2] \ x[2] \cdot y[0] - y[2] \cdot x[0] \ x[0] \cdot y[1] - y[0] \cdot x[1] \end{pmatrix}
$$