Game dev
Saved & recent

Cross product

Takes two 3D vectors and returns a third one that is perpendicular to both. Its length equals the area of the parallelogram the two inputs span.

The main use is finding a surface normal from two edges of a triangle. Swapping the inputs flips the result.

Further reading
LearnOpenGL: Transformations: cross product
a b a × b area 6
The parallelogram spans 6 square units. The blue cross product is perpendicular to it, and swapping the inputs flips the arrow to the dashed direction.

View in the full Game dev collection