参考链接:

https://zhidao.baidu.com/question/576596182.html

1.弧度和角度的转换

[Unity算法]弧度和角度-LMLPHP

2.sin函数

[Unity算法]弧度和角度-LMLPHP

3.cos函数

[Unity算法]弧度和角度-LMLPHP

4.tan函数

[Unity算法]弧度和角度-LMLPHP

5.特殊的三角函数值

[Unity算法]弧度和角度-LMLPHP

6.测试

c#

 using UnityEngine;

 public class TestAngle : MonoBehaviour {

     void Start ()
{
Debug.Log(Mathf.Sin(Mathf.Deg2Rad * ));
Debug.Log(Mathf.Sin(Mathf.Deg2Rad * ));
Debug.Log(Mathf.Cos(Mathf.Deg2Rad * ));
Debug.Log(Mathf.Cos(Mathf.Deg2Rad * ));
Debug.Log(Mathf.Tan(Mathf.Deg2Rad * ));
Debug.Log(Mathf.Tan(Mathf.Deg2Rad * ));
}
}

输出如下:

[Unity算法]弧度和角度-LMLPHP

lua

[Unity算法]弧度和角度-LMLPHP

05-11 20:08