C# Класс TRock.Music.Grooveshark.DoubleExtensions

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

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

Метод Описание
AreCloseTo ( this value1, double value2 ) : bool

AreCloseTo returns whether or not two doubles are "close". That is, whether or not they are within epsilon of each other. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.

GreaterThan ( this value1, double value2 ) : bool

GreaterThan returns whether or not the first double is greater than the second double. That is, whether or not the first is strictly greater than *and* not within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.

GreaterThanOrClose ( this value1, double value2 ) : bool

GreaterThanOrClose returns whether or not the first double is greater than or close to the second double. That is, whether or not the first is strictly greater than or within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.

IsFinite ( this value ) : bool

Test to see if a double is a finite number (is not NaN or Infinity).

IsValidSize ( this value ) : bool

Test to see if a double a valid size value (is finite and > 0).

LessThan ( this value1, double value2 ) : bool

LessThan returns whether or not the first double is less than the second double. That is, whether or not the first is strictly less than *and* not within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.

LessThanOrClose ( this value1, double value2 ) : bool

LessThanOrClose returns whether or not the first double is less than or close to the second double. That is, whether or not the first is strictly less than or within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.

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

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

AreCloseTo returns whether or not two doubles are "close". That is, whether or not they are within epsilon of each other. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.
public static AreCloseTo ( this value1, double value2 ) : bool
value1 this The first double to compare.
value2 double The second double to compare.
Результат bool

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

GreaterThan returns whether or not the first double is greater than the second double. That is, whether or not the first is strictly greater than *and* not within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.
public static GreaterThan ( this value1, double value2 ) : bool
value1 this The first double to compare.
value2 double The second double to compare.
Результат bool

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

GreaterThanOrClose returns whether or not the first double is greater than or close to the second double. That is, whether or not the first is strictly greater than or within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.
public static GreaterThanOrClose ( this value1, double value2 ) : bool
value1 this The first double to compare.
value2 double The second double to compare.
Результат bool

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

Test to see if a double is a finite number (is not NaN or Infinity).
public static IsFinite ( this value ) : bool
value this The value to test.
Результат bool

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

Test to see if a double a valid size value (is finite and > 0).
public static IsValidSize ( this value ) : bool
value this The value to test.
Результат bool

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

LessThan returns whether or not the first double is less than the second double. That is, whether or not the first is strictly less than *and* not within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.
public static LessThan ( this value1, double value2 ) : bool
value1 this The first double to compare.
value2 double The second double to compare.
Результат bool

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

LessThanOrClose returns whether or not the first double is less than or close to the second double. That is, whether or not the first is strictly less than or within epsilon of the other number. There are plenty of ways for this to return false even for numbers which are theoretically identical, so no code calling this should fail to work if this returns false.
public static LessThanOrClose ( this value1, double value2 ) : bool
value1 this The first double to compare.
value2 double The second double to compare.
Результат bool