如何計算直線與水平軸之間的角度? - 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?
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章