QuickDraw 3D provides routines that you can use to calculate dot (or scalar , or inner ) products of vectors.
You can use the Q3Vector2D_Dot function to determine the dot product of two two-dimensional vectors.
float Q3Vector2D_Dot (
const TQ3Vector2D *v1,
const TQ3Vector2D *v2);
You can use the Q3Vector3D_Dot function to determine the dot product of two three-dimensional vectors.
float Q3Vector3D_Dot (
const TQ3Vector3D *v1,
const TQ3Vector3D *v2);