【发布时间】:2017-08-11 10:25:49
【问题描述】:
我有圆和半径的 centerX 和 centerY 值。现在我有 (x1, y1) 点位于圆上。我想知道该点的圆角。
我尝试了以下公式来获得 (x1, y1) 的角度。但它没有给出通用的解决方案。
radian = Math.Atan2(y1 - Cy, x1 - Cx);
angle = radian * (180 / Math.PI);
请参考我的要求截图。
请让我提出我做错了什么。?
【问题讨论】:
-
我相信这是因为 atan2 给出的答案在 -180 到 180 度之间,而你想要 0 到 360 度
-
我认为这涵盖了这里的数学Finding the angle between two points
标签: c# math geometry trigonometry