Vector Calculator
Dot product, cross product, angle and magnitudes of two 3D vectors. Set z to 0 for 2D.
What dot and cross tell you
The dot product is a · b = |a||b|cosθ: positive when vectors point the same general way, zero when perpendicular, negative when opposed. In gameplay code it answers 'is the enemy in front of me?' with one multiply-add per axis. The cross product gives a vector perpendicular to both, with length |a||b|sinθ; its direction (right-hand rule) is how you get surface normals and turn directions.
Normalize before you compare
Direction checks want unit vectors: divide by the magnitude first, and the dot product becomes pure cosθ in [-1, 1]. Forgetting to normalize is the classic reason a field-of-view check works at close range and misbehaves far away.