[StructLayout(LayoutKind.Sequential, Size = 1)] public struct
A Mathematics Function interface.
public const float
kPhi
The golden ratio.
public const float
kE
Euler's number. (e)
public const float
kSqrt2
Shorthand for writing FSqrt(2).
public const float
kSqrt3
Shorthand for writing FSqrt(3).
public const float
kPI
PI
public const float
kInversePI
Shorthand for writing 1 / kPI.
public const float
kHalfPI
Shorthand for writing kPI * kHalf.
public const float
k2PI
Shorthand for writing kPI * 2f.
public const float
k1To255RGB
The conversion from 0-1 to 0-255.
public const float
kOneThird
Shorthand for writing / 3.
public const float
kTwoThirds
Shorthand for writing / 1.5.
public static bool
public static float
public static float
public static float
public static float
public static float
public static float
public static float
public static float
public static float
public static sbyte
public static short
public static int
public static float
public static double
public static sbyte
public static short
public static int
public static float
public static double
public static sbyte
public static short
public static int
public static float
public static double
public static sbyte
public static short
public static int
public static float
public static double
public static sbyte
public static short
public static int
public static float
public static double
public static float
public static float
public static float
public static float
public static float
public static int
public static float
public static int
public static float
public static int
public static int
Returns:
1 if positive, -1 if negative, 0 if zero.
public static int
Returns:
1 if positive, -1 if negative, 0 if zero.
public static int
Returns:
1 if positive, -1 if negative, 0 if zero.
public static int
Returns:
1 if positive, -1 if negative, 0 if zero.
public static int
Returns:
1 if positive, -1 if negative, 0 if zero.
public static void
Summary:
Clamps B between Min and Max.
public static void
Summary:
Clamps S between Min and Max.
public static void
Summary:
Clamps I between Min and Max.
public static void
Summary:
Clamps F between Min and Max.
public static void
Summary:
Clamps D between Min and Max.
public static sbyte
Summary:
Clamps B between Min and Max.
public static short
Summary:
Clamps S between Min and Max.
public static int
Summary:
Clamps I between Min and Max.
public static float
Summary:
Clamps F between Min and Max.
public static double
Summary:
Clamps D between Min and Max.
public static float
Summary:
If F is considered zero, return zero.
Returns:
F < ZeroThreshold ? 0F : F
public static double
Summary:
If D is considered zero, return zero.
Returns:
D < ZeroThreshold ? 0.0 : D
public static float
Summary:
If F is considered zero, return zero.
Returns:
F < ZeroThreshold ? 0F : F
public static double
Summary:
If D is considered zero, return zero.
Returns:
D < ZeroThreshold ? 0.0 : D
public static float
Summary:
Difference between two angles.
Returns:
The difference between two angles.
public static float
Summary:
Interpolates between A and B by Alpha.
Returns:
Interpolated number Alpha percentage between A and B.
public static float
Summary:
Interpolates between two Angles.
Returns:
Interpolated angle between A and B by Alpha.
public static float
Summary:
Inverse Lerp from A to B by F.
F:
Current between A and B.
Returns:
Percentage F is towards B, relative to A.
public static float
Summary:
Approach Now to Target by MaximumDelta.
MaximumDelta:
Step from Now towards Target.
public static float
Summary:
Approach Now degrees to Target degrees by MaximumDelta.
MaximumDelta:
Angle step Now towards Target.
public static float
Summary:
Smooths the transition From -> To by Aloha.
Alpha:
Percentage from From -> To.
public static bool
Summary:
If A and B are within Tolerance of each other.
Tolerance:
Equality threshold.
Returns:
Abs(A - B) <= Tolerance.
public static bool
Summary:
If two MVectors are approximately equal across all components.
Remarks:
Compares MVector.SqrMagnitude against Tolerance.
Tolerance:
Equality threshold.
Returns:
if the square magnitude of A - B are within +-Tolerance.
public static float
Summary:
Smooths the approach velocity of numerical values.
Params:
Now:
Current Angle.
Target:
Target Angle.
RefVelocity:
Reference to the current velocity of the number from Now to Target.
SmoothTime:
Time it should take for Now to reach Target.
DeltaTime:
Time since the last call to this function.
Terminal:
The maximum increment Now should take to reach Target.
Returns:
A smoothed approach from Now to Target.
public static float
Summary:
Smooths the velocity of angles in a trigonometry space.
Params:
Now:
Current Angle.
Target:
Target Angle.
RefVelocity:
Reference to the current velocity of the Angle from Now to Target.
SmoothTime:
Time it should take for Now to reach Target.
DeltaTime:
Time since the last call to this function.
Terminal:
The maximum increment Now should take to reach Target.
Returns:
A smoothed approach from Now to Target, considering angles.
public static float
Summary:
Ping-pongs F by Magnitude.
Params:
F:
The number to ping-pong.
Magnitude:
The length of the ping-pong.
Returns:
An oscillating number that goes between +- Magnitude.
public static float
Summary:
The previous factor of Multiple from F.
Params:
F:
The base number.
Multiple:
The factor.
Returns:
A factor of Multiple before F.
public static float
Summary:
The next factor of Multiple from F.
Params:
F:
The base number
Multiple:
The factor.
Returns:
A factor of Multiple after F.
public static float
Summary:
The closest factor of Multiple from F.
Params:
F:
The base number.
Multiple:
The factor.
Returns:
A factor of Multiple that F is closest to.