给定 y 和 x,与 x 轴的角度由下式给出: atan2(y, x) // note that Y is first 对于 (0.5, 0.5),角度为: 弧度: In [2]: math.atan2(0.5, 0.5) Out[2]: 0.7853981633974483 度数: In [3]: math.atan2(0.5, 0.5)*180/math.pi Out[3]: 45.0 原文由 mpenkov 发布,翻译遵循 CC BY-SA 4.0 许可协议
给定 y 和 x,与 x 轴的角度由下式给出:
对于 (0.5, 0.5),角度为:
弧度:
度数: