Mathf.Abs绝对值
计算并返回指定参数 f 绝对值。
Mathf.Acos反余弦
static function Acos (f : float) : float
以弧度为单位计算并返回参数 f 中指定的数字的反余弦值。
Mathf.Approximately近似
static function Approximately (a : float, b: float) : bool
比较两个浮点数值,看它们是否非常接近, 由于浮点数值不精确,不建议使用等于来比较它们。例如,1.0==10.0/10.0也许不会返回true。
1 public class example : MonoBehaviour 2 { 3 public void Awake() 4 { 5 if(Mathf.Approximately(1.0F, 10.0F / 10.0F)) 6 print("same"); 7 } 8 }