Show / Hide Table of Contents

Class DoubleExtensions

Provides extension methods for System.Double

Inheritance
System.Object
DoubleExtensions
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Extensions
Assembly: Sartorius.SAF.dll
Syntax
public static class DoubleExtensions
Remarks

Closeness is checked by using an epsilon of 1.53E-06

Methods

View Source

GreaterThan(Double, Double)

Determines whether a value is greater than the other and not close (see IsClose(Double, Double)).

Declaration
public static bool GreaterThan(this double value1, double value2)
Parameters
Type Name Description
System.Double value1

The first System.Double.

System.Double value2

The other System.Double.

Returns
Type Description
System.Boolean

true if the values are not close and value1 is greater than value2.

Remarks

Closeness is checked by using an epsilon of 1.53E-06

View Source

GreaterThanOrClose(Double, Double)

Determines whether a value is greater than another or close to it.

Declaration
public static bool GreaterThanOrClose(this double value1, double value2)
Parameters
Type Name Description
System.Double value1

The first System.Double.

System.Double value2

The other System.Double.

Returns
Type Description
System.Boolean

true if the values are close or value1 is greater than value2.

Remarks

Closeness is checked by using an epsilon of 1.53E-06

View Source

IsClose(Double, Double)

Determines whether a System.Double is close to another.

Declaration
public static bool IsClose(this double value1, double value2)
Parameters
Type Name Description
System.Double value1

The first System.Double.

System.Double value2

The other System.Double.

Returns
Type Description
System.Boolean

true if the two values are close to each other.

Remarks

Closeness is checked by using an epsilon of 1.53E-06

View Source

IsFinite(Double)

Determines whether a value is finite

Declaration
public static bool IsFinite(this double value)
Parameters
Type Name Description
System.Double value

The value to check.

Returns
Type Description
System.Boolean

True if value is finite.

Remarks

Finite means the value is not System.Double.NaN, not System.Double.NegativeInfinity and not System.Double.PositiveInfinity.

View Source

LessThan(Double, Double)

Determines whether a value is less than the other and not close (see IsClose(Double, Double)).

Declaration
public static bool LessThan(this double value1, double value2)
Parameters
Type Name Description
System.Double value1

The first System.Double.

System.Double value2

The other System.Double.

Returns
Type Description
System.Boolean

true if the values are not close and value1 is less than value2.

Remarks

Closeness is checked by using an epsilon of 1.53E-06

View Source

LessThanOrClose(Double, Double)

Determines whether a value is less than another or close to it.

Declaration
public static bool LessThanOrClose(this double value1, double value2)
Parameters
Type Name Description
System.Double value1

The first System.Double.

System.Double value2

The other System.Double.

Returns
Type Description
System.Boolean

true if the values are close or value1 is less than value2.

Remarks

Closeness is checked by using an epsilon of 1.53E-06

  • View Source
Back to top Generated by DocFX