DoubleExtensions Class

Provides extension methods for the double type.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public static class DoubleExtensions
Inheritance
Object    DoubleExtensions

Methods

IsNegativeZero Gets whether the specified value is negative zero.
TolerantCeiling Gets the ceiling of the specified value using a specific tolerance. That is the closest integral number to value if the difference from that is not larger than tolerance; otherwise, the smallest integral value that is greater than value.
TolerantEquals Gets whether two double values are equal considering the specified tolerance.
TolerantFloor Gets the floor of the specified value using a specific tolerance. That is the closest integral number to value if the difference from that is not larger than tolerance; otherwise, the largest integral value that is less than value.
TolerantIsZero Gets whether the specified value can be considered zero using a specific tolerance.
ToRoundtripString Returns a culture-invariant String representation of the given Double value, from which the original value can be parsed without losing any information.

Fields

NegativeZero Represents the negative zero value. This value is constant.

See Also