Quantcast
Typesetting math: 100%

θ=cos-1(A^B^)

vCalc Reviewed
θ=cos-1(A^B^)
(xa)X component of vector A
(ya)Y component of vector A
(xb)X component of the vector B
(yb)Y component of the vector B

The angle between vectors (2D) formula, θ=cos-1(A^B^),/attachments/3871f723-e6f5-11e5-9770-bc764e2038f2/AdotB.png   Sum of vectors A and B computes the angle between two vectors.  To do so, this function:

  1. computes the magnitude of each vector
  2. uses the magnitudes to convert both vectors to unit vectors,
  3. computes the dot product of the two unit vectors, and finally
  4. takes the arc-cosine of the dot product to provide the angle between the two input vectors.

Note: the input vectors do NOT need to be unit vectors.