[Unity算法]弧度和角度

参考链接:

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

 

1.弧度和角度的转换

[Unity算法]弧度和角度

 

2.sin函数

[Unity算法]弧度和角度

 

3.cos函数

[Unity算法]弧度和角度

 

4.tan函数

[Unity算法]弧度和角度

 

5.特殊的三角函数值

[Unity算法]弧度和角度

 

6.测试

c#

 1 using UnityEngine;
 2 
 3 public class TestAngle : MonoBehaviour {
 4 
 5     void Start ()
 6     {
 7         Debug.Log(Mathf.Sin(Mathf.Deg2Rad * 30));
 8         Debug.Log(Mathf.Sin(Mathf.Deg2Rad * 90));
 9         Debug.Log(Mathf.Cos(Mathf.Deg2Rad * 60));
10         Debug.Log(Mathf.Cos(Mathf.Deg2Rad * 180));
11         Debug.Log(Mathf.Tan(Mathf.Deg2Rad * 45));
12         Debug.Log(Mathf.Tan(Mathf.Deg2Rad * 135));
13     }
14 }

 

输出如下:

[Unity算法]弧度和角度

 

lua

[Unity算法]弧度和角度

posted on 2019-02-19 22:05 艰苦奋斗中 阅读(...) 评论(...) 编辑 收藏