C# Class SilverFlow.Controls.Extensions.MathExtensions

Math extensions
Afficher le fichier Open project: Zoomicon/ZUI

Méthodes publiques

Méthode Description
AbsMin ( double num1, double num2 ) : double

Compares two numbers without their signs and gets absolutely minimal value.

EnsureInRange ( this number, double low, double high ) : double

Ensures the given number is in the specified range.

IsNear ( this number, double testNumber, double accuracy ) : bool

Determines whether the specified number is near the test number.

IsNotSet ( this number ) : bool

Determines whether the number is NaN.

ValueOrZero ( this number ) : double

Returns a double value if it is not a NAN, or zero.

Method Details

AbsMin() public static méthode

Compares two numbers without their signs and gets absolutely minimal value.
public static AbsMin ( double num1, double num2 ) : double
num1 double First number.
num2 double Second number.
Résultat double

EnsureInRange() public static méthode

Ensures the given number is in the specified range.
public static EnsureInRange ( this number, double low, double high ) : double
number this The number.
low double The lower limit.
high double The upper limit.
Résultat double

IsNear() public static méthode

Determines whether the specified number is near the test number.
public static IsNear ( this number, double testNumber, double accuracy ) : bool
number this The number.
testNumber double The test number.
accuracy double Accuracy.
Résultat bool

IsNotSet() public static méthode

Determines whether the number is NaN.
public static IsNotSet ( this number ) : bool
number this The number.
Résultat bool

ValueOrZero() public static méthode

Returns a double value if it is not a NAN, or zero.
public static ValueOrZero ( this number ) : double
number this The number.
Résultat double