I've recently learned about the existence of dot product and I was wanted to know how to determine the value range between two normalized vectors.
1 Answer
The dot product of two normalized (unit) vectors will be a scalar value between -1 and 1.
Common useful interpretations of this value are
- when it is 0, the two vectors are perpendicular (that is, forming a 90 degree angle with each other)
- when it is 1, the vectors are parallel ("facing the same direction") and
- when it is -1, the vectors are anti-parallel ("facing opposite directions")
Because the dot product is, geometrically, the product of the magnitudes of the vectors and the cosine of the angle between them (\$\vert{a}\vert\vert{b}\vert \cos{\theta} \$) it also useful for finding \$\theta\$: it's just \$\arccos{(a \cdot b)}\$ since the magnitudes of the vectors are both one.
You may also be interested in interpretations of the dot product between non-normalized vectors, which is discussed in this related question.
ax*bx+ay*by
It's fairly straight forward. \$\endgroup\$