Dot product
Takes two vectors and returns one number. For unit vectors that number says how much they point the same way: 1 for the same direction, 0 for a right angle, -1 for opposite.
It answers questions like "is the enemy in front of me?" and "how directly does light hit this surface?". See diffuse lighting.
a · b = ax*bx + ay*by + az*bz
- Further reading
- LearnOpenGL: Transformations: dot product