Start () {
//绝对值
float a = Mathf.Abs(-5);
Mathf.Clamp用来限制对象各个轴的活动范围
//范围限制
float b = Mathf.Clamp(6,-5,10);
Mathf.Ceil上限值会无线接近最近的整数值 (往上加)
//上限值
float c = Mathf.Ceil(3.6f);
Mathf.Floor下限值会无线接近最近的整数值 (往下减)
float d = Mathf.Floor(3.9f);
//最大值
float e = Mathf.Max(1,2,5,9,10);
//最小值
float f = Mathf.Min(1,2,5,9,10);
//圆周率
float g = Mathf.PI; print(g);
//次方
float h = Mathf.Pow(2,3);
//开方
float k= Mathf.Sqrt(4);
//四舍五入到最近的整数(int
int i= Mathf.RoundToInt(5.56f);
//四舍五入到最近的整数(float
float m = Mathf.Round(5.56f);
float n = Mathf.PI / 2;
//弧度转度
float p = Mathf.Rad2Deg * n;
//度转弧度
float v = Mathf.Deg2Rad * p;
//插值 x+(y-x)*t
float z = Mathf.Lerp(10,60,0.5f);
//重复
float l = Mathf.Repeat(Time.deltaTime,10);
//乒乓(往返)
float j = Mathf.PingPong(Time.deltaTime,10);
}