Mathf
- Abs
- Acos
- Approximately
- Asin
- Atan2
- Atan
- CeilToInt
- Ceil
- Clamp01
- Clamp
- ClosestPowerOfTwo
- Cos
- Deg2Rad
- DeltaAngle
- Epsilon
- Exp
- FloorToInt
- Floor
- Infinity
- InverseLerp
- IsPowerOfTwo
- LerpAngle
- Lerp
- Log10
- Log
- Max
- Min
- MoveTowardsAngle
- MoveTowards
- NegativeInfinity
- NextPowerOfTwo
- PingPong
- PI
- Pow
- Rad2Deg
- Repeat
- RoundToInt
- Round
- Sign
- Sin
- SmoothDampAngle
- SmoothDamp
- SmoothStep
- Sqrt
- Tan
Mathf.Sqrt 平方根
static function Sqrt (f : float) : float
Description描述
Returns square root of f.
计算并返回 f 的平方根。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
print(Mathf.Sqrt(10));
}
}
print(Mathf.Sqrt(10));
最后修改:2011年2月21日 Monday 12:34