DoubleExtensionsTolerantEquals Method
Gets whether two
double values are equal considering the specified
tolerance.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public static bool TolerantEquals(
this double value,
double other,
double tolerance = 1E-06
)
<ExtensionAttribute>
Public Shared Function TolerantEquals (
value As Double,
other As Double,
Optional tolerance As Double = 1E-06
) As Boolean
public:
[ExtensionAttribute]
static bool TolerantEquals(
double value,
double other,
double tolerance = 1E-06
)
[<ExtensionAttribute>]
static member TolerantEquals :
value : float *
other : float *
?tolerance : float
(* Defaults:
let _tolerance = defaultArg tolerance 1E-06
*)
-> bool
- value Double
- The value to be compared to another one.
- other Double
- The other value compared to the self value.
- tolerance Double (Optional)
- The tolerance to be used. For the best performance its value is not checked but it should be some low positive value to get a reasonable result. This parameter is optional.
Default value: 0.000001 (10-6).
Boolean, if the values are equal considering the specified
tolerance; otherwise,
.In Visual Basic and C#, you can call this method as an instance method on any object of type
Double. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).