C# Класс SilverFlow.Controls.Extensions.MathExtensions

Math extensions
Показать файл Открыть проект

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

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

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

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

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

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

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

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

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

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

Determines whether the number is NaN.
public static IsNotSet ( this number ) : bool
number this The number.
Результат bool

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

Returns a double value if it is not a NAN, or zero.
public static ValueOrZero ( this number ) : double
number this The number.
Результат double