Struct Mathf
Assembly: UnityEngine.dll
Syntax
Fields
|
Improve this Doc
View Source
Deg2Rad
Declaration
public const float Deg2Rad = 0.0174532924F
Field Value
|
Improve this Doc
View Source
Epsilon
Declaration
public static readonly float Epsilon
Field Value
|
Improve this Doc
View Source
Infinity
Declaration
public const float Infinity = InfinityF
Field Value
|
Improve this Doc
View Source
NegativeInfinity
Declaration
public const float NegativeInfinity = -InfinityF
Field Value
|
Improve this Doc
View Source
PI
Declaration
public const float PI = 3.14159274F
Field Value
|
Improve this Doc
View Source
Rad2Deg
Declaration
public const float Rad2Deg = 57.29578F
Field Value
Methods
|
Improve this Doc
View Source
Abs(Int32)
Declaration
public static int Abs(int value)
Parameters
Type |
Name |
Description |
Int32 |
value |
|
Returns
|
Improve this Doc
View Source
Abs(Single)
Declaration
public static float Abs(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Acos(Single)
Declaration
public static float Acos(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Approximately(Single, Single)
Declaration
public static bool Approximately(float a, float b)
Parameters
Returns
|
Improve this Doc
View Source
Asin(Single)
Declaration
public static float Asin(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Atan(Single)
Declaration
public static float Atan(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Atan2(Single, Single)
Declaration
public static float Atan2(float y, float x)
Parameters
Returns
|
Improve this Doc
View Source
Ceil(Single)
Declaration
public static float Ceil(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
CeilToInt(Single)
Declaration
public static int CeilToInt(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Clamp(Int32, Int32, Int32)
Declaration
public static int Clamp(int value, int min, int max)
Parameters
Returns
|
Improve this Doc
View Source
Clamp(Single, Single, Single)
Declaration
public static float Clamp(float value, float min, float max)
Parameters
Returns
|
Improve this Doc
View Source
Clamp01(Single)
Declaration
public static float Clamp01(float value)
Parameters
Type |
Name |
Description |
Single |
value |
|
Returns
ClosestPowerOfTwo(Int32)
Declaration
public static int ClosestPowerOfTwo(int value)
Parameters
Type |
Name |
Description |
Int32 |
value |
|
Returns
Declaration
public static Color CorrelatedColorTemperatureToRGB(float kelvin)
Parameters
Type |
Name |
Description |
Single |
kelvin |
|
Returns
|
Improve this Doc
View Source
Cos(Single)
Declaration
public static float Cos(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
DeltaAngle(Single, Single)
Declaration
public static float DeltaAngle(float current, float target)
Parameters
Returns
|
Improve this Doc
View Source
Exp(Single)
Declaration
public static float Exp(float power)
Parameters
Type |
Name |
Description |
Single |
power |
|
Returns
FloatToHalf(Single)
Declaration
public static ushort FloatToHalf(float val)
Parameters
Type |
Name |
Description |
Single |
val |
|
Returns
|
Improve this Doc
View Source
Floor(Single)
Declaration
public static float Floor(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
FloorToInt(Single)
Declaration
public static int FloorToInt(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Gamma(Single, Single, Single)
Declaration
public static float Gamma(float value, float absmax, float gamma)
Parameters
Returns
GammaToLinearSpace(Single)
Declaration
public static float GammaToLinearSpace(float value)
Parameters
Type |
Name |
Description |
Single |
value |
|
Returns
HalfToFloat(UInt16)
Declaration
public static float HalfToFloat(ushort val)
Parameters
Type |
Name |
Description |
UInt16 |
val |
|
Returns
|
Improve this Doc
View Source
InverseLerp(Single, Single, Single)
Declaration
public static float InverseLerp(float a, float b, float value)
Parameters
Returns
IsPowerOfTwo(Int32)
Declaration
public static bool IsPowerOfTwo(int value)
Parameters
Type |
Name |
Description |
Int32 |
value |
|
Returns
|
Improve this Doc
View Source
Lerp(Single, Single, Single)
Declaration
public static float Lerp(float a, float b, float t)
Parameters
Returns
|
Improve this Doc
View Source
LerpAngle(Single, Single, Single)
Declaration
public static float LerpAngle(float a, float b, float t)
Parameters
Returns
|
Improve this Doc
View Source
LerpUnclamped(Single, Single, Single)
Declaration
public static float LerpUnclamped(float a, float b, float t)
Parameters
Returns
LinearToGammaSpace(Single)
Declaration
public static float LinearToGammaSpace(float value)
Parameters
Type |
Name |
Description |
Single |
value |
|
Returns
|
Improve this Doc
View Source
Log(Single)
Declaration
public static float Log(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Log(Single, Single)
Declaration
public static float Log(float f, float p)
Parameters
Returns
|
Improve this Doc
View Source
Log10(Single)
Declaration
public static float Log10(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Max(Int32, Int32)
Declaration
public static int Max(int a, int b)
Parameters
Returns
|
Improve this Doc
View Source
Max(Int32[])
Declaration
public static int Max(params int[] values)
Parameters
Type |
Name |
Description |
Int32[] |
values |
|
Returns
|
Improve this Doc
View Source
Max(Single, Single)
Declaration
public static float Max(float a, float b)
Parameters
Returns
|
Improve this Doc
View Source
Max(Single[])
Declaration
public static float Max(params float[] values)
Parameters
Type |
Name |
Description |
Single[] |
values |
|
Returns
|
Improve this Doc
View Source
Min(Int32, Int32)
Declaration
public static int Min(int a, int b)
Parameters
Returns
|
Improve this Doc
View Source
Min(Int32[])
Declaration
public static int Min(params int[] values)
Parameters
Type |
Name |
Description |
Int32[] |
values |
|
Returns
|
Improve this Doc
View Source
Min(Single, Single)
Declaration
public static float Min(float a, float b)
Parameters
Returns
|
Improve this Doc
View Source
Min(Single[])
Declaration
public static float Min(params float[] values)
Parameters
Type |
Name |
Description |
Single[] |
values |
|
Returns
|
Improve this Doc
View Source
MoveTowards(Single, Single, Single)
Declaration
public static float MoveTowards(float current, float target, float maxDelta)
Parameters
Returns
|
Improve this Doc
View Source
MoveTowardsAngle(Single, Single, Single)
Declaration
public static float MoveTowardsAngle(float current, float target, float maxDelta)
Parameters
Returns
NextPowerOfTwo(Int32)
Declaration
public static int NextPowerOfTwo(int value)
Parameters
Type |
Name |
Description |
Int32 |
value |
|
Returns
PerlinNoise(Single, Single)
Declaration
public static float PerlinNoise(float x, float y)
Parameters
Returns
|
Improve this Doc
View Source
PingPong(Single, Single)
Declaration
public static float PingPong(float t, float length)
Parameters
Returns
|
Improve this Doc
View Source
Pow(Single, Single)
Declaration
public static float Pow(float f, float p)
Parameters
Returns
|
Improve this Doc
View Source
Repeat(Single, Single)
Declaration
public static float Repeat(float t, float length)
Parameters
Returns
|
Improve this Doc
View Source
Round(Single)
Declaration
public static float Round(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
RoundToInt(Single)
Declaration
public static int RoundToInt(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Sign(Single)
Declaration
public static float Sign(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Sin(Single)
Declaration
public static float Sin(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
SmoothDamp(Single, Single, ref Single, Single)
Declaration
[ExcludeFromDocs]
public static float SmoothDamp(float current, float target, ref float currentVelocity, float smoothTime)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDamp(Single, Single, ref Single, Single, Single)
Declaration
[ExcludeFromDocs]
public static float SmoothDamp(float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDamp(Single, Single, ref Single, Single, Single, Single)
Declaration
public static float SmoothDamp(float current, float target, ref float currentVelocity, float smoothTime, [DefaultValue("Mathf.Infinity")] float maxSpeed, [DefaultValue("Time.deltaTime")] float deltaTime)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDampAngle(Single, Single, ref Single, Single)
Declaration
[ExcludeFromDocs]
public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDampAngle(Single, Single, ref Single, Single, Single)
Declaration
[ExcludeFromDocs]
public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed)
Parameters
Returns
|
Improve this Doc
View Source
SmoothDampAngle(Single, Single, ref Single, Single, Single, Single)
Declaration
public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime, [DefaultValue("Mathf.Infinity")] float maxSpeed, [DefaultValue("Time.deltaTime")] float deltaTime)
Parameters
Returns
|
Improve this Doc
View Source
SmoothStep(Single, Single, Single)
Declaration
public static float SmoothStep(float from, float to, float t)
Parameters
Returns
|
Improve this Doc
View Source
Sqrt(Single)
Declaration
public static float Sqrt(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
|
Improve this Doc
View Source
Tan(Single)
Declaration
public static float Tan(float f)
Parameters
Type |
Name |
Description |
Single |
f |
|
Returns
Extension Methods