C# Class Afterglow.Math.MathExtensions

Contains extension methods.
Afficher le fichier Open project: Christof/afterglow

Méthodes publiques

Méthode Description
Clamp ( this value, float min, float max ) : float

Clamps the value to the range given by min and max.

ClampMax ( this value, float max ) : float

Clamps the value to the given maximum.

ClampMin ( this value, float min ) : float

Clamps the value to the given minimum.

EqualsWithDelta ( this value, float other ) : bool

Indicates whether the two floats are equal under the consideration of Constants.DELTA.

EqualsWithDelta ( this value, float other, float delta ) : bool

Indicates whether the two floats are equal under the consideration of the given delta value.

Method Details

Clamp() public static méthode

Clamps the value to the range given by min and max.
public static Clamp ( this value, float min, float max ) : float
value this The value to be clamped.
min float The min value.
max float The max value.
Résultat float

ClampMax() public static méthode

Clamps the value to the given maximum.
public static ClampMax ( this value, float max ) : float
value this The value.
max float The maximum.
Résultat float

ClampMin() public static méthode

Clamps the value to the given minimum.
public static ClampMin ( this value, float min ) : float
value this The value.
min float The minimum.
Résultat float

EqualsWithDelta() public static méthode

Indicates whether the two floats are equal under the consideration of Constants.DELTA.
public static EqualsWithDelta ( this value, float other ) : bool
value this The value.
other float The other.
Résultat bool

EqualsWithDelta() public static méthode

Indicates whether the two floats are equal under the consideration of the given delta value.
public static EqualsWithDelta ( this value, float other, float delta ) : bool
value this The value.
other float The other.
delta float The delta.
Résultat bool