蓝鸥Unity入门Mathf类学习笔记
相关文章
蓝鸥Unity入门脚本组件学习笔记
蓝鸥Unity入门脚本生命周期学习笔记
蓝鸥Unity入门Input类学习笔记
蓝鸥Unity入门GameObject学习笔记
蓝鸥Unity入门Vector3学习笔记
蓝鸥Unity入门Transform学习笔记
蓝鸥Unity入门Time类学习笔记
一、工具类
Mathf类中封装了常用的数学方法二、Mathf类
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public float angLeSpeed;
void Update () {
//求绝对值
int i=Mathf.Abs(-12);// i=12
//求最大最小值,可变参数
int m= Mathf.Max(12,16,44,3,6);
int ni = Mathf.Min (3,5);
//三角函数
Mathf.Sin();
Mathf.Cos ();
Mathf.PI ;
int s= Mathf.Sqrt (4);
}
}