public static class
Helper Variables and Functions.
public static bool
Summary:
If Self can see Target within SearchAngle degrees while facing Face.
Params:
Face:
The direction Self is facing.
Self:
The Transform searching for Target.
Target:
The position to look out for.
SearchAngle:
The maximum degrees to search for Target.
Returns:
True if Self can see Target within SearchAngle while facing Face.
public static bool
Summary:
If Self can see Target within SearchAngle degrees while facing Face.
Params:
Face:
The direction Self is facing.
Self:
The Transform searching for Target.
Target:
The position to look out for.
SearchAngle:
The maximum degrees to search for Target.
Returns:
True if Self can see Target within SearchAngle while facing Face.
public static bool
Summary:
If Self has an unobstructed line of sight to To.
Params:
Self:
The Vector3 position to look from.
To:
The Vector3 position to look to.
Obstacles:
The LayerMask obstacles to consider obtrusive.
public static bool
Summary:
If Self has an unobstructed line of sight to To.
Params:
Self:
The Vector3 position to look from.
To:
The Vector3 position to look to.
public static float
Summary:
The Value rounded to DecimalPlaces.
Params:
Value:
The value to be rounded.
DecimalPlaces:
The decimal places to be included.
public static void
Summary:
Flip-Flops bBool.
public static void
Summary:
Flip-Flops bBool.
CallbackTrue:
The method to call if the flip-flop is true.
CallbackFalse:
The method to call if the flip-flop is false.
public static bool
Summary:
If Value is within the +- Limit of From.
Params:
Value:
The value to check.
From:
The value to compare.
Limit:
The limits to consider.
public static Vector3
Summary:
The largest Vector3 between L and R, according to Vector3.sqrMagnitude.
public static Vector3
Summary:
The largest Vector3 between L and R, according to Vector3.sqrMagnitude.
public static int
Summary:
Returns the N'th Fibonacci number.
public static Vector3[]
Summary:
Generates spherical points with an equal distribution.
Params:
Resolution:
The number of points to generate.
GoldenRatioModifier:
Adjusts the golden ratio.
Returns:
The Vector3[] points for the sphere.
public static Vector3[]
Summary:
Generates the points to 'bridge' Origin and Target together at a Height as an arc.
Params:
Origin:
The Vector3 starting point of the bridge.
Target:
The Vector3 ending point of the bridge.
Resolution:
The number of points for the bridge.
Height:
The maximum height of the bridge.
Returns:
The Vector3[] points for the bridge.
public static float
Summary:
Mirrors Number about Minimum and Maximum, inclusive.
Params:
Number:
The number to anchor a reflection.
Minimum:
The minimum number that can be reflected.
Maximum:
The maximum number that can be reflected.
Returns:
The reflected number.
public static int
Summary:
Mirrors Number about Minimum and Maximum, inclusive. Not to be confused with MArray
Params:
Number:
The number to anchor a reflection.
Minimum:
The minimum number that can be reflected.
Maximum:
The maximum number that can be reflected.
Returns:
The reflected number.
public static void
Summary:
Swaps L and R.
public static void
Summary:
Clamps I to be between Min and Max.
Params:
I:
A reference to the Integer to clamp.
Min:
The Minimum value of I.
Max:
The Maximum value of I.
public static void
Summary:
Clamps I to not fall below Min.
Params:
I:
A reference to the Integer to clamp.
Min:
The Minimum value I can be.
public static void
Summary:
Clamps I to not exceed Max.
Params:
I:
A reference to the Integer to clamp.
Max:
The Maximum value I can be.
public static void
Summary:
Clamps F to not fall below Min.
Params:
F:
A reference to the Float to clamp.
Min:
The Minimum value F can be.
public static void
Summary:
Clamps F to not exceed Max.
Params:
F:
A reference to the Float to clamp.
Max:
The Maximum value F can be.
public static void
Summary:
Clamps F to be between Min and Max.
Params:
F:
A reference to the Float to clamp.
Min:
The Minimum value of F.
Max:
The Maximum value of F.
public static float
Summary:
The larger value between F1 and F2.
Returns:
The larger of the two given floats.
public static float
Summary:
The smaller value between F1 and F2.
Returns:
The smaller of the two given floats.
public static int
Summary:
The larger value between I1 and I2.
Returns:
The larger of the two given ints.
public static int
Summary:
The smaller value between I1 and I2.
Returns:
The smaller of the two given ints.
public static void
Summary:
Modifies I to be its Absolute Value.
Remarks:
Ref& version of FastAbs().
Params:
I:
A reference to the int to modify.
public static void
Summary:
Modifies F to be its Absolute Value.
Remarks:
Ref& version of FastAbs().
Params:
F:
A reference to the float to modify.
public static MVector
Summary:
Abs() on all V's components.
Params:
V:
The Vector to Abs.
Returns:
An MVector with all positive components.
public static void
Summary:
Modifies V to be positive on all components.
Params:
V:
The Vector to modify.
public static bool
Summary:
Whether or not a float is considered to be zero.
Params:
F:
The float to check.
Tolerance:
The threshold for F to be considered zero.
Returns:
True if F is +- Tolerance of zero.
public static void
Summary:
Locks or unlocks the Cursor and optionally hide it.
Remarks:
Unlocking the cursor will always enable the Cursor's visibility.
Params:
bLockCursor:
True to lock the Cursor.
bHideCursorOnLock:
True to hide the Cursor when it's locked.
public static int
Summary:
Gets the number of frames per second during runtime.
Returns:
The number of frames per second.
public static IEnumerator
Summary:
Executes a Delayed call to Function after Seconds by Owner.
Params:
Owner:
The MonoBehaviour which owns this delayed call.
Seconds:
The number of seconds to wait until Function is called.
Function:
The Function to execute after Seconds has elapsed.
Returns:
The IEnumerator responsible for handling this delayed call.
public static IEnumerator
Summary:
Executes a Delayed call to Function after another Dependent delayed call by Owner.
Params:
Owner:
The MonoBehaviour which owns this delayed call.
Dependent:
The other delayed call to wait until Function can be executed.
Function:
The Function to execute after Dependent has finished.
Returns:
The IEnumerator responsible for handling this delayed call.
public static IEnumerator
Summary:
Executes a Delayed call to Function after a Dependent delayed call, followed by AdditionalSeconds, by Owner.
Params:
Owner:
The MonoBehaviour which owns this delayed call.
Dependent:
The other delayed call to wait until Function can be executed.
AdditionalSeconds:
The number of seconds to wait after Dependent has finished.
Function:
The Function to execute after Dependent has finished and AdditionalSeconds has elapsed.
Returns:
The IEnumerator responsible for handling this delayed call.
public static float
Summary:
Compares two strings for similarity.
Params:
BaseString:
The string to compare against.
CompString:
The string to compare to.
bCaseSensitive:
True to consider character casing in the similarity calculation.
bConsiderSpaces:
True to consider space ' ' characters in the similarity calculation.
Returns:
A score between 0 to 1 depending on how similar CompString is to BaseString. 0 = Completely different, 1 = Identical.