|
static FP | Abs (FP value) |
| Returns the absolute value of the argument. More...
|
|
static FP | Acos (FP value) |
| Returns the arc-cosine of value - the angle in radians whose cosine is value . More...
|
|
static FP | AngleBetweenDegrees (FP source, FP target) |
| Calculates the smallest signed angle between any two angles. F.e. angle between -179 and 179 is -2. Rotation is ccw. More...
|
|
static Int64 | AngleBetweenDegreesRaw (Int64 source, Int64 target) |
| Same as AngleBetweenDegrees using Raw optimization. More...
|
|
static FP | AngleBetweenRadians (FP source, FP target) |
| Calculates the smallest signed angle between any two angles. More...
|
|
static Int64 | AngleBetweenRadiansRaw (Int64 source, Int64 target) |
| Same as AngleBetweenDegrees using Raw optimization. More...
|
|
static FP | Asin (FP value) |
| Returns the arc-sine of value - the angle in radians whose sine is value . More...
|
|
static FP | Atan (FP value) |
| Returns the arc-tangent of value - the angle in radians whose tangent is value . More...
|
|
static FP | Atan2 (FP y, FP x) |
| Returns the angle in radians whose Tan(FP) is y /x . This function returns correct angle even if x is zero. More...
|
|
static FP | Barycentric (FP value1, FP value2, FP value3, FP t1, FP t2) |
| Performs barycentric interpolation. More...
|
|
static FP | CatmullRom (FP value1, FP value2, FP value3, FP value4, FP t) |
| Performs Cotmull-Rom interpolation. More...
|
|
static FP | Ceiling (FP value) |
| Returns the smallest integer larger than or equal to value . More...
|
|
static Int32 | CeilToInt (FP value) |
| Returns the smallest integer larger than or equal to value . More...
|
|
static FP | Clamp (FP value, FP min, FP max) |
| Clamps the given value between the given minimum and maximum values. More...
|
|
static Int32 | Clamp (Int32 value, Int32 min, Int32 max) |
| Clamps the given value between the given minimum and maximum values. More...
|
|
static Int64 | Clamp (Int64 value, Int64 min, Int64 max) |
| Clamps the given value between the given minimum and maximum values. More...
|
|
static FP | Clamp01 (FP value) |
| Clamps the given value between 0 and 1. More...
|
|
static FP | ClampUseable (FP value) |
| Clamps the given value between FP.UseableMin and FP.UseableMax. More...
|
|
static FP | Cos (FP rad) |
| Returns the cosine of angle rad . More...
|
|
static FP | CosHighPrecision (FP rad) |
| Returns the high precision cosine of angle rad . More...
|
|
static FP | Exp (FP x) |
| Returns e raised to the specified power. The max relative error is ~0.3% in the range of [-6, 32]. More...
|
|
static FP | Floor (FP value) |
| Returns the largest integer smaller than or equal to value . More...
|
|
static Int32 | FloorToInt (FP value) |
| Returns the largest integer smaller than or equal to value . More...
|
|
static FP | Fraction (FP value) |
| Returns the fractional part of the argument. More...
|
|
static FP | Hermite (FP value1, FP tangent1, FP value2, FP tangent2, FP t) |
| Performs cubic Hermite interpolation. More...
|
|
static FP | InverseLerp (FP start, FP end, FP value) |
| Calculates the linear parameter that produces the interpolant value within the range [start , end ]. The result is clamped to the range [0, 1]. More...
|
|
static FP | InverseLerpUnclamped (FP start, FP end, FP value) |
| Calculates the linear parameter that produces the interpolant value within the range [start , end ]. More...
|
|
static FP | Lerp (FP start, FP end, FP t) |
| Linearly interpolates between start and end by t . t is clamped to the range [0, 1] More...
|
|
static FP | LerpRadians (FP start, FP end, FP t) |
| Linearly interpolates between start and end by t . t is clamped to the range [0, 1]. The difference between start and end is converted to a [-Pi/2, Pi/2] range. More...
|
|
static FP | LerpUnclamped (FP start, FP end, FP t) |
| Linearly interpolates between start and end by t . More...
|
|
static FP | Ln (FP value) |
| Returns natural logarithm of value . More...
|
|
static FP | Log (FP value, FP logBase) |
| Returns logarithm of value in base logBase . It is much more performant and precise to use Log2, Log10 and Ln if logBase is 2, 10 or e. More...
|
|
static FP | Log10 (FP value) |
| Returns logarithm of value in base 10. More...
|
|
static FP | Log2 (FP value) |
| Returns logarithm of value in base 2. More...
|
|
static Int32 | Log2CeilingToInt (FP value) |
| Returns celining of the logarithm of value in base 2. It is much faster than calling FPMath.Log2(FP) and then FPMath.CeilToInt(FP) More...
|
|
static Int32 | Log2FloorToInt (FP value) |
| Returns floor of the logarithm of value in base 2. It is much faster than calling FPMath.Log2(FP) and then FPMath.FloorToInt(FP) More...
|
|
static FP | Max (FP val1, FP val2) |
| Returns the largest of two or more values. More...
|
|
static FP | Max (params FP[] numbers) |
| Returns the largest of two or more values. More...
|
|
static FP | Min (FP val1, FP val2) |
| Returns the smallest of two or more values. More...
|
|
static FP | Min (params FP[] numbers) |
| Returns the smallest of two or more values. More...
|
|
static void | MinMax (FP a, FP b, out FP min, out FP max) |
|
static FP | ModuloClamped (FP a, FP n) |
| Performs modulo operation without forcing the sign of the dividend: So that ModuloClamped(-9, 10) = 1. More...
|
|
static Int64 | ModuloClamped (Int64 a, Int64 n) |
| Performs modulo operation without forcing the sign of the dividend: So that ModuloClamped(-9, 10) = 1. More...
|
|
static Int32 | NextPowerOfTwo (Int32 value) |
| Returns the next power of two that is equal to, or greater than, the argument. More...
|
|
static FP | Repeat (FP t, FP length) |
| Loops the value t , so that it is never larger than length and never smaller than 0. More...
|
|
static FP | Round (FP value) |
| Returns value rounded to the nearest integer. More...
|
|
static Int32 | RoundToInt (FP value) |
| Returns value rounded to the nearest integer. More...
|
|
static FP | Sign (FP value) |
| Returns the sign of value . More...
|
|
static Int32 | SignInt (FP value) |
| Returns the sign of value . More...
|
|
static FP | SignZero (FP value) |
| Returns the sign of value if it is non-zero. More...
|
|
static Int32 | SignZeroInt (FP value) |
| Returns the sign of value if it is non-zero. More...
|
|
static FP | Sin (FP rad) |
| Returns the sine of angle rad . More...
|
|
static void | SinCos (FP rad, out FP sin, out FP cos) |
| Calculates sine and cosine of angle rad . It is faster than calling Sin(FP) and Cos(FP) separately. More...
|
|
static void | SinCosHighPrecision (FP rad, out FP sin, out FP cos) |
| Calculates high precision sine and cosine of angle rad . It is faster than calling SinHighPrecision(FP) and CosHighPrecision(FP) separately. More...
|
|
static FP | SinHighPrecision (FP rad) |
| Returns the high precision sine of angle rad . More...
|
|
static FP | SmoothStep (FP start, FP end, FP t) |
| Interpolates between start and end with smoothing at the limits. Equivalent of calling Hermite(FP, FP, FP, FP, FP) with tangents set to 0 and clamping t between 0 and 1. More...
|
|
static FP | Sqrt (FP value) |
| Returns square root of value . More...
|
|
static FP | Tan (FP rad) |
| Returns the tangent of angle rad . More...
|
|
A collection of common math functions.