C# Class Nexus.MathUtility

Afficher le fichier Open project: tgjones/nexus

Méthodes publiques

Méthode Description
Acos ( float radians ) : float
Asin ( float sin ) : float
Atan2 ( float y, float x ) : float
Ceiling ( float value ) : int
Clamp ( byte value, byte min, byte max ) : byte

Clamps a value to an interval.

Clamp ( float value, float min, float max ) : float

Clamps a value to an interval.

Clamp ( int value, int min, int max ) : int

Clamps a value to an interval.

Cos ( float radians ) : float
Exp ( float value ) : float
Floor ( float value ) : int
IsZero ( float value ) : bool
Lerp ( byte value1, byte value2, float amount ) : byte

Interpolates linearly between the supplied values.

Lerp ( float value1, float value2, float amount ) : float

Interpolates linearly between the supplied values.

Lerp ( float value1, float value2, float startAmount, float endAmount, float amount ) : float
Lerp ( int value1, int value2, float amount ) : int

Interpolates linearly between the supplied values.

Log2 ( float d ) : float
Mod ( double a, double b ) : double

Returns a mod b. This differs from the % operator with respect to negative numbers.

Mod ( int a, int b ) : int

Returns a mod b. This differs from the % operator with respect to negative numbers.

PerspectiveInterpolate ( float value1, float value2, float w1, float w2, float amountRangeStart, float amountRangeEnd, float amount ) : float
Pow ( float x, float y ) : float
Quadratic ( float A, float B, float C, float &t0, float &t1 ) : bool
Round ( float value ) : int
Saturate ( float value ) : float
Sin ( float radians ) : float
SmoothStep ( float a, float b, float x ) : float

A smoothed step function. A cubic function is used to smooth the step between two thresholds.

Sqrt ( float value ) : float
Swap ( float &v1, float &v2 ) : void
Tan ( float radians ) : float
ToDegrees ( float radians ) : float
ToRadians ( float degrees ) : float

Method Details

Acos() public static méthode

public static Acos ( float radians ) : float
radians float
Résultat float

Asin() public static méthode

public static Asin ( float sin ) : float
sin float
Résultat float

Atan2() public static méthode

public static Atan2 ( float y, float x ) : float
y float
x float
Résultat float

Ceiling() public static méthode

public static Ceiling ( float value ) : int
value float
Résultat int

Clamp() public static méthode

Clamps a value to an interval.
public static Clamp ( byte value, byte min, byte max ) : byte
value byte The input parameter.
min byte The lower clamp threshold.
max byte The upper clamp threshold.
Résultat byte

Clamp() public static méthode

Clamps a value to an interval.
public static Clamp ( float value, float min, float max ) : float
value float The input parameter.
min float The lower clamp threshold.
max float The upper clamp threshold.
Résultat float

Clamp() public static méthode

Clamps a value to an interval.
public static Clamp ( int value, int min, int max ) : int
value int The input parameter.
min int The lower clamp threshold.
max int The upper clamp threshold.
Résultat int

Cos() public static méthode

public static Cos ( float radians ) : float
radians float
Résultat float

Exp() public static méthode

public static Exp ( float value ) : float
value float
Résultat float

Floor() public static méthode

public static Floor ( float value ) : int
value float
Résultat int

IsZero() public static méthode

public static IsZero ( float value ) : bool
value float
Résultat bool

Lerp() public static méthode

Interpolates linearly between the supplied values.
public static Lerp ( byte value1, byte value2, float amount ) : byte
value1 byte The lower interpolation bound.
value2 byte The upper interpolation bound.
amount float The interpolation parameter.
Résultat byte

Lerp() public static méthode

Interpolates linearly between the supplied values.
public static Lerp ( float value1, float value2, float amount ) : float
value1 float The lower interpolation bound.
value2 float The upper interpolation bound.
amount float The interpolation parameter.
Résultat float

Lerp() public static méthode

public static Lerp ( float value1, float value2, float startAmount, float endAmount, float amount ) : float
value1 float
value2 float
startAmount float
endAmount float
amount float
Résultat float

Lerp() public static méthode

Interpolates linearly between the supplied values.
public static Lerp ( int value1, int value2, float amount ) : int
value1 int The lower interpolation bound.
value2 int The upper interpolation bound.
amount float The interpolation parameter.
Résultat int

Log2() public static méthode

public static Log2 ( float d ) : float
d float
Résultat float

Mod() public static méthode

Returns a mod b. This differs from the % operator with respect to negative numbers.
public static Mod ( double a, double b ) : double
a double The dividend.
b double The divisor.
Résultat double

Mod() public static méthode

Returns a mod b. This differs from the % operator with respect to negative numbers.
public static Mod ( int a, int b ) : int
a int The dividend.
b int The divisor.
Résultat int

PerspectiveInterpolate() public static méthode

public static PerspectiveInterpolate ( float value1, float value2, float w1, float w2, float amountRangeStart, float amountRangeEnd, float amount ) : float
value1 float
value2 float
w1 float
w2 float
amountRangeStart float
amountRangeEnd float
amount float
Résultat float

Pow() public static méthode

public static Pow ( float x, float y ) : float
x float
y float
Résultat float

Quadratic() public static méthode

public static Quadratic ( float A, float B, float C, float &t0, float &t1 ) : bool
A float
B float
C float
t0 float
t1 float
Résultat bool

Round() public static méthode

public static Round ( float value ) : int
value float
Résultat int

Saturate() public static méthode

public static Saturate ( float value ) : float
value float
Résultat float

Sin() public static méthode

public static Sin ( float radians ) : float
radians float
Résultat float

SmoothStep() public static méthode

A smoothed step function. A cubic function is used to smooth the step between two thresholds.
public static SmoothStep ( float a, float b, float x ) : float
a float The lower threshold position.
b float The upper threshold position.
x float The input parameter.
Résultat float

Sqrt() public static méthode

public static Sqrt ( float value ) : float
value float
Résultat float

Swap() public static méthode

public static Swap ( float &v1, float &v2 ) : void
v1 float
v2 float
Résultat void

Tan() public static méthode

public static Tan ( float radians ) : float
radians float
Résultat float

ToDegrees() public static méthode

public static ToDegrees ( float radians ) : float
radians float
Résultat float

ToRadians() public static méthode

public static ToRadians ( float degrees ) : float
degrees float
Résultat float