C# Class GameMath.MathF

Afficher le fichier Open project: npruehs/game-math Class Usage Examples

Méthodes publiques

Méthode Description
Equals ( float x, float y ) : bool

Checks whether the two passed numbers are equal, with respect to possible loss of precision caused by rounding values.

Exp ( float x ) : float

Raises e to the specified power.

Lerp ( float x, float y, float l ) : float

Linearly interpolates between the two passed values.

Log ( float x ) : float

Returns the natural (base e) logarithm of the specified number.

Log10 ( float x ) : float

Returns the base 10 logarithm of the specified number.

Pow ( float x, float y ) : float

Returns the passed number raised to the specified power.

Sqrt ( float x ) : float

Returns the square root of the specified number.

Method Details

Equals() public static méthode

Checks whether the two passed numbers are equal, with respect to possible loss of precision caused by rounding values.
public static Equals ( float x, float y ) : bool
x float /// First number to compare. ///
y float /// Second number to compare. ///
Résultat bool

Exp() public static méthode

Raises e to the specified power.
public static Exp ( float x ) : float
x float Power to raise e to.
Résultat float

Lerp() public static méthode

Linearly interpolates between the two passed values.
public static Lerp ( float x, float y, float l ) : float
x float /// First value to interpolate. ///
y float /// Second value to interpolate. ///
l float /// Interpolation parameter. 0 returns , 1 returns . ///
Résultat float

Log() public static méthode

Returns the natural (base e) logarithm of the specified number.
public static Log ( float x ) : float
x float Number of get the natural logarithm of.
Résultat float

Log10() public static méthode

Returns the base 10 logarithm of the specified number.
public static Log10 ( float x ) : float
x float Number to get the base 10 logarithm of.
Résultat float

Pow() public static méthode

Returns the passed number raised to the specified power.
public static Pow ( float x, float y ) : float
x float Number to compute the power of.
y float Exponent.
Résultat float

Sqrt() public static méthode

Returns the square root of the specified number.
public static Sqrt ( float x ) : float
x float /// Number to get the square root of. ///
Résultat float