Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Direction of a vector relative to another vector?

  1. Nov 1, 2013 #1
    Hello, I have two vectors, the angle between them is dynamic and constantly changing. I have found a way to calculate the angle between these two vectors. But this angle is always a positive number even if i am looking left or right. How can i get context(wether vector DC,DB,DE,DF according to the image below) is to the right of vector DA or to the left of it?
  2. jcsd
  3. Nov 2, 2013 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper

    If you define the angle anti-clockwise from DA, then it will always be a positive number - yeah.

    You want your domain to go from -180 to 180 deg, then you need to handle the case where the vector is at +170deg and you rotate it +20deg (in the positive rotation direction) to put is at -170deg.

    But when the angle is constantly changing you are better off with the standard approach.
    Note - ##+3\pi/2= -\pi/2## ... you should get negative angles if the vector rotated the opposite way.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook