FloatExtensionsTolerantFloor Method
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.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.0.0
public static float TolerantFloor(
this float value,
float tolerance = 1E-06f
)
<ExtensionAttribute>
Public Shared Function TolerantFloor (
value As Single,
Optional tolerance As Single = 1E-06F
) As Single
public:
[ExtensionAttribute]
static float TolerantFloor(
float value,
float tolerance = 1E-06f
)
[<ExtensionAttribute>]
static member TolerantFloor :
value : float32 *
?tolerance : float32
(* Defaults:
let _tolerance = defaultArg tolerance 1E-06f
*)
-> float32
- value Single
- The value, whose floor is abut to be retrieved.
- tolerance Single (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).
SingleThe floor 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
Single. 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).