If $v$ and $w$ are nonzero vectors then $\frac{v \cdot w}{\|v\|\|w\|}=\cos \theta$ This is just taking dot product of the unit vectors with the same directions. [[dot product of unit vectors is cosine of angle between]]