public static float Atan2(float y,float x);
返回以弧度表示的角度,其Tan为y/x。
代码:
45°的弧度:
Debug测试:
完全一致
扩展阅读:
[1] [Unity]从零开始认识C#脚本——以第三人称控制器为例
参考文档:
[1] [Unity3D日常] Mathf.Atan2函数研究
let today = new Beginning();
Click the left button to use the catalog.
public static float Atan2(float y,float x);
返回以弧度表示的角度,其Tan为y/x。
代码:
45°的弧度:
Debug测试:
完全一致
扩展阅读:
[1] [Unity]从零开始认识C#脚本——以第三人称控制器为例
参考文档:
[1] [Unity3D日常] Mathf.Atan2函数研究
This article was last edited at 2020-04-07 18:11:45