如何计算直线与水平轴之间的角度? - How to calculate the angle between a line and the horizontal axis?

问题:

In a programming language (Python, C#, etc) I need to determine how to calculate the angle between a line and the horizontal axis?在编程语言(Python、C# 等)中,我需要确定如何计算直线与水平轴之间的角度?

I think an image describes best what I want:我认为一张图片最能描述我想要的东西:

没有言语可以描述这一点

Given (P1 x ,P1 y ) and (P2 x ,P2 y ) what is the best way to calculate this angle?给定 (P1 x ,P1 y ) 和 (P2 x ,P2 y ) 计算这个角度的最佳方法是什么? The origin is in the topleft and only the positive quadrant is used.原点位于左上角,仅使用正象限。


解决方案:

参考一: https://stackoom.com/question/VpTr
参考二: How to calculate the angle between a line and the horizontal axis?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章