Mathf
UnityEngine.Mathf · Official documentation
Scripts can use these 59 members of Mathf. Anything not listed here is a compile error when you build your world.
Properties and fields
| Name | Access |
|---|---|
Deg2Rad | read only |
Epsilon | read only |
Infinity | read only |
NegativeInfinity | read only |
PI | read only |
Rad2Deg | read only |
Methods
| Method | Parameters |
|---|---|
Abs | (int) |
Abs | (float) |
Acos | (float) |
Approximately | (float, float) |
Asin | (float) |
Atan | (float) |
Atan2 | (float, float) |
Ceil | (float) |
CeilToInt | (float) |
Clamp | (int, int, int) |
Clamp | (float, float, float) |
Clamp01 | (float) |
ClosestPowerOfTwo | (int) |
CorrelatedColorTemperatureToRGB | (float) |
Cos | (float) |
DeltaAngle | (float, float) |
Exp | (float) |
Floor | (float) |
FloorToInt | (float) |
Gamma | (float, float, float) |
GammaToLinearSpace | (float) |
InverseLerp | (float, float, float) |
IsPowerOfTwo | (int) |
Lerp | (float, float, float) |
LerpAngle | (float, float, float) |
LerpUnclamped | (float, float, float) |
LinearToGammaSpace | (float) |
Log | (float) |
Log | (float, float) |
Log10 | (float) |
Max | (int[]) |
Max | (float[]) |
Max | (int, int) |
Max | (float, float) |
Min | (int[]) |
Min | (float[]) |
Min | (int, int) |
Min | (float, float) |
MoveTowards | (float, float, float) |
MoveTowardsAngle | (float, float, float) |
NextPowerOfTwo | (int) |
PerlinNoise | (float, float) |
PerlinNoise1D | (float) |
PingPong | (float, float) |
Pow | (float, float) |
Repeat | (float, float) |
Round | (float) |
RoundToInt | (float) |
Sign | (float) |
Sin | (float) |
SmoothStep | (float, float, float) |
Sqrt | (float) |
Tan | (float) |