[Unity]什么是Mathf.Atan2函数?
Copyright Notice: This article is an original work licensed under the CC 4.0 BY-NC-ND license.
If you wish to repost this article, please include the original source link and this copyright notice.
Source link: https://v2know.com/article/236
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 09:11:45