Find angle between two points, respective to horizontal axis?

前端 未结 2 1290
死守一世寂寞
死守一世寂寞 2021-01-24 06:38

I have two points, one is always at the origin (0,0), and the other can be anywhere else in the world. I\'d like to find the angle between them, respective to the horizontal axi

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-24 07:00

    Most programming languages/APIs provide a function, atan2(), which finds the angle and takes the quadrant into consideration. Just use that.

提交回复
热议问题