public static class
public static float
Summary:
The EEquation to use to accelerate.
Params:
Equation:
The EEquation to use to accelerate.
CurrentSpeed:
The current speed of the acceleration.
RateOfAcceleration:
The rate to accelerate towards to terminal from current speed.
Terminal:
The maximum speed.
DeltaTime:
Delta time between two Speed calculations.
Returns:
The acceleration value using EEquation, using the current speed and rate of acceleration towards terminal over Time.deltaTime.
public static float
Summary:
The rate of deceleration.
[Obsolete] public static float
Params:
Self:
The Rigidbody to calculate an acceleration rate.
Speed:
The current speed of the Rigidbody in EUnit.MetresPerSecond.
Returns:
The float rate of movement in EUnit.MetresPerSecond.
public static float
Summary:
The rate of acceleration in m/s^2.
DeltaTime:
The difference in time between LastPosition and ThisPosition in seconds.
Returns:
The rate of acceleration if an object went from LastPosition to ThisPosition in DeltaTime.
public static float
Summary:
Converts a Rigidbody's speed from metres per second to UUnit.
Params:
Self:
The Rigidbody to read a speed from.
Unit:
The desired EUnit of measurement.
Returns:
A speed reading from self in EUnit of measurement.
public static MVector
Summary:
The direction to intercept Target relative to Projectile.
Remarks:
Requires movement in BOTH Rigidbodies. This function was designed specifically for aircraft.
Params:
Projectile:
The Rigidbody predicting the movement of RBTarget.
Target:
The Rigidbody to predict.
public static MVector
Summary:
Predicts the path of a target's movement for a projectile to be launched.
Params:
LaunchPosition:
World location of where a projectile will be launched.
ConstantMoveSpeed:
The movement speed of the projectile that will be launched.
TargetVelocity:
The direction of where the target is heading and the speed it is travelling at.
TargetPosition:
The world location of the target.
Returns:
A world location of where a projectile should aim towards so that it intercepts the target.
public static bool
Summary:
Whether Number is a power of two.
Params:
Number:
The number to check.
Returns:
Number & (Number - 1) == 0.
public static int
Summary:
The greatest common divisor of A and B.
public static int
Summary:
The lowest common multiple of A and B.
public static float
Summary:
Wraps f between Min and Max.
Params:
F:
The float number to wrap.
Min:
The minimum value to wrap.
Max:
The maximum value to wrap.
public static float
Summary:
Wraps n between Min and Max.
Params:
n:
The float number to wrap.
Min:
The minimum value to wrap.
Max:
The maximum value to wrap.
public static bool
Summary:
Whether M1 is parallel to M2 within ParallelThreshold.
Params:
M1:
Whether this vector is parallel to the other.
M2:
Whether this vector is parallel to the other.
ParallelThreshold:
The threshold to consider parallel vectors.
public static bool
Summary:
Whether Vector has been normalised.
Params:
Vector:
The vector to check.
public static float
Summary:
The angle in degrees pointing towards Direction using the X-Axis and Z-Axis. (For 3D space)
Params:
Direction:
The direction to calculate an angle towards.
public static float
Summary:
The angle in degrees pointing towards Direction using the X-Axis and Y-Axis. (For 2D space)
Params:
Direction:
The direction to calculate an angle towards.
public static Quaternion
Summary:
Converts a normalised vector direction to a Quaternion rotation
Remarks:
Roll (Z) cannot be calculated from a direction vector.
Params:
From:
Origin
To:
Target
Returns:
Quaternion rotation from to.
public static Quaternion
Summary:
Converts a normalised vector to a Quaternion rotation.
Remarks:
Roll (Z) cannot be calculated from a direction vector.
Params:
V:
Normalised direction vector.
Returns:
Quaternion rotation without roll.
public static Vector3
Summary:
Converts V to Pitch Yaw Roll.
Remarks:
Roll (Z) cannot be calculated from a direction vector.
Params:
V:
Normalised direction vector.
Returns:
X = Pitch, Y = Yaw, Z = Roll = 0.
public static void
Summary:
The 11-Degree Minimax Approximation Sine and 10-Degree Minimax Approximation Cosine over an angle.
Remarks:
Out Sine and Cosine are accurate to 2.4E-5 of the real sine and cosine of Angle.
Params:
Sine:
The Sine result over AngleInDegrees.
Cosine:
The Cosine result over AngleInDegrees.
Angle:
The angle in degrees.
bUseExactValue:
True to use MathF.Sin and MathF.Cos for the exact SinCos values.
public static float
Summary:
Calculates the Square Distance between two Vector3s.
Returns:
The Square Distance between L and R.
public static float
Summary:
A fast version of Vector3.Distance().
Returns:
The distance between L and R.
public static float
Summary:
The distance over the circumference of a circle given two points and radius.
Params:
A:
Point A.
B:
Point B.
Radius:
Radius of the sphere.
Returns:
The distance between two points given a radius.