C# Class LostPolygon.DynamicWaterSystem.FastFunctions

A collection of fast implementations of mathematical functions.
Afficher le fichier Open project: caffeinatedguy/Limbs Class Usage Examples

Méthodes publiques

Méthode Description
FastCos ( float x ) : float

Calculates the approximate value of cosine function at a given angle.

This function is much faster than Mathf.Cos(), especially on mobile devices.

FastInvSqrt ( float x ) : float

Calculates the approximate inverse square root of a given value.

This function is much faster than calling 1/Mathf.Sqrt(x), especially on mobile devices.

FastIsNaN ( float x ) : bool

Checks whether the float value is NaN.

This function is much faster than calling Math.IsNaN(), especially on mobile devices.

FastLog2 ( float x ) : float

Calculates the approximate log2 of a given value.

This function is much faster than Mathf.Log(), especially on mobile devices.

FastPow ( float a, float b ) : float

Calculates the approximate value of a^b.

This function is much faster than Mathf.Pow(), especially on mobile devices.

FastPow2 ( float x ) : float

Calculates the approximate value of 2^x.

This function is much faster than Mathf.Pow(), especially on mobile devices.

FastPowInt ( float a, int b ) : float

Calculates the approximate value of a^b.

This function is much faster than Mathf.Pow(), especially on mobile devices.

FastSin ( float x ) : float

Calculates the approximate value of sine function at a given angle.

This function is much faster than Mathf.Sin(), especially on mobile devices.

FastSqrt ( float x ) : float

Calculates the approximate square root of a given value.

This function is much faster than Mathf.Sqrt(), especially on mobile devices.

FastVector3Magnitude ( Vector3 vector ) : float

Calculates the approximate magnitude of Vector3.

This function is much faster than Vector3.magnitude, especially on mobile devices.

Method Details

FastCos() public static méthode

Calculates the approximate value of cosine function at a given angle.
This function is much faster than Mathf.Cos(), especially on mobile devices.
public static FastCos ( float x ) : float
x float /// The angle in radians. ///
Résultat float

FastInvSqrt() public static méthode

Calculates the approximate inverse square root of a given value.
This function is much faster than calling 1/Mathf.Sqrt(x), especially on mobile devices.
public static FastInvSqrt ( float x ) : float
x float /// The input value. ///
Résultat float

FastIsNaN() public static méthode

Checks whether the float value is NaN.
This function is much faster than calling Math.IsNaN(), especially on mobile devices.
public static FastIsNaN ( float x ) : bool
x float /// The input value to be checked. ///
Résultat bool

FastLog2() public static méthode

Calculates the approximate log2 of a given value.
This function is much faster than Mathf.Log(), especially on mobile devices.
public static FastLog2 ( float x ) : float
x float /// Input value. ///
Résultat float

FastPow() public static méthode

Calculates the approximate value of a^b.
This function is much faster than Mathf.Pow(), especially on mobile devices.
public static FastPow ( float a, float b ) : float
a float /// The base value. ///
b float /// The power value. ///
Résultat float

FastPow2() public static méthode

Calculates the approximate value of 2^x.
This function is much faster than Mathf.Pow(), especially on mobile devices.
public static FastPow2 ( float x ) : float
x float /// Input value. ///
Résultat float

FastPowInt() public static méthode

Calculates the approximate value of a^b.
This function is much faster than Mathf.Pow(), especially on mobile devices.
public static FastPowInt ( float a, int b ) : float
a float /// The base value. ///
b int /// The power value. ///
Résultat float

FastSin() public static méthode

Calculates the approximate value of sine function at a given angle.
This function is much faster than Mathf.Sin(), especially on mobile devices.
public static FastSin ( float x ) : float
x float /// The angle in radians. ///
Résultat float

FastSqrt() public static méthode

Calculates the approximate square root of a given value.
This function is much faster than Mathf.Sqrt(), especially on mobile devices.
public static FastSqrt ( float x ) : float
x float /// Input value. ///
Résultat float

FastVector3Magnitude() public static méthode

Calculates the approximate magnitude of Vector3.
This function is much faster than Vector3.magnitude, especially on mobile devices.
public static FastVector3Magnitude ( Vector3 vector ) : float
vector UnityEngine.Vector3 /// Input vector. ///
Résultat float