DoubleExtensionsTolerantCeiling Method
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.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
public static double TolerantCeiling(
this double value,
double tolerance = 1E-06
)
<ExtensionAttribute>
Public Shared Function TolerantCeiling (
value As Double,
Optional tolerance As Double = 1E-06
) As Double
public:
[ExtensionAttribute]
static double TolerantCeiling(
double value,
double tolerance = 1E-06
)
[<ExtensionAttribute>]
static member TolerantCeiling :
value : float *
?tolerance : float
(* Defaults:
let _tolerance = defaultArg tolerance 1E-06
*)
-> float
- value Double
- The value, whose ceiling is abut to be retrieved.
- tolerance Double (Optional)
- The tolerance to be used. For the best performance its value is not checked but the reasonable value is between 0 and 0.5. This parameter is optional.
Default value: 0.000001 (10-6).
DoubleThe ceiling of the specified
value using the specified
tolerance.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).