[Unity算法]弧度和角度

[Unity算法]弧度和角度

参考链接:

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

 

1.弧度和角度的转换

[Unity算法]弧度和角度_第1张图片

 

2.sin函数

[Unity算法]弧度和角度_第2张图片

 

3.cos函数

[Unity算法]弧度和角度_第3张图片

 

4.tan函数

[Unity算法]弧度和角度_第4张图片

 

5.特殊的三角函数值

[Unity算法]弧度和角度_第5张图片

 

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算法]弧度和角度_第6张图片

 

lua

[Unity算法]弧度和角度_第7张图片

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

转载于:https://www.cnblogs.com/lyh916/p/10403665.html

你可能感兴趣的:([Unity算法]弧度和角度)