C# Класс LostPolygon.DynamicWaterSystem.FastFunctions

A collection of fast implementations of mathematical functions.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

FastCos() публичный статический Метод

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. ///
Результат float

FastInvSqrt() публичный статический Метод

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. ///
Результат float

FastIsNaN() публичный статический Метод

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. ///
Результат bool

FastLog2() публичный статический Метод

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. ///
Результат float

FastPow() публичный статический Метод

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. ///
Результат float

FastPow2() публичный статический Метод

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. ///
Результат float

FastPowInt() публичный статический Метод

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. ///
Результат float

FastSin() публичный статический Метод

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. ///
Результат float

FastSqrt() публичный статический Метод

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. ///
Результат float

FastVector3Magnitude() публичный статический Метод

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. ///
Результат float