How to calculate the angle of a vector from the vertical?

后端 未结 9 1348
感情败类
感情败类 2020-12-15 10:15

Im trying to find out the angle (in degrees) between two 2D vectors. I know I need to use trig but I\'m not too good with it. This is what I\'m trying to work out (the Y axi

9条回答
  •  甜味超标
    2020-12-15 10:47

    My first guess would be to calculate the angle of each vector with the axes using atan(y/x) and then subtract those angels and take the absolute value, that is:

    abs(atan(y/x) - atan(y1/x1))

提交回复
热议问题