KGy SOFT

FloatExtensions Class

KGy SOFT Core Libraries Help
Provides extension methods for the float type.
Inheritance Hierarchy

SystemObject
  KGySoft.CoreLibrariesFloatExtensions

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.3.0
Syntax

public static class FloatExtensions

The FloatExtensions type exposes the following members.

Methods

  NameDescription
Public methodStatic memberIsNegativeZero
Gets whether the specified value is negative zero.
Public methodStatic memberTolerantCeiling
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.
Public methodStatic memberTolerantEquals
Gets whether two float values are equal considering the specified tolerance.
Public methodStatic memberTolerantFloor
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.
Public methodStatic memberTolerantIsZero
Gets whether the specified value can be considered zero using a specific tolerance.
Public methodStatic memberToRoundtripString
Returns a culture-invariant String representation of the given Single value, from which the original value can be parsed without losing any information.
Top
Fields

  NameDescription
Public fieldStatic memberNegativeZero
Represents the negative zero value. This value is constant.
Top
See Also

Reference