C# Class TRock.Music.Grooveshark.DoubleExtensions

Afficher le fichier Open project: torshy/TRock.Music

Méthodes publiques

Méthode Description
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.

Method Details

AreCloseTo() public static méthode

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.
Résultat bool

GreaterThan() public static méthode

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.
Résultat bool

GreaterThanOrClose() public static méthode

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.
Résultat bool

IsFinite() public static méthode

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.
Résultat bool

IsValidSize() public static méthode

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.
Résultat bool

LessThan() public static méthode

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.
Résultat bool

LessThanOrClose() public static méthode

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.
Résultat bool