C# Class TRock.Music.Grooveshark.DoubleExtensions

Datei anzeigen Open project: torshy/TRock.Music

Public Methods

Method 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 method

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.
return bool

GreaterThan() public static method

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.
return bool

GreaterThanOrClose() public static method

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.
return bool

IsFinite() public static method

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.
return bool

IsValidSize() public static method

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.
return bool

LessThan() public static method

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.
return bool

LessThanOrClose() public static method

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.
return bool