UtilNumericsConvertToFraction(Decimal, Double) Method
Converts a decimal number to a
Fraction.
Namespace: DevCase.Core.Math.CommonAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Fraction ConvertToFraction(
decimal value,
double accuracy = 0,01
)
Public Shared Function ConvertToFraction (
value As Decimal,
Optional accuracy As Double = 0,01
) As Fraction
Dim value As Decimal
Dim accuracy As Double
Dim returnValue As Fraction
returnValue = UtilNumerics.ConvertToFraction(value,
accuracy)
public:
static Fraction^ ConvertToFraction(
Decimal value,
double accuracy = 0,01
)
static member ConvertToFraction :
value : decimal *
?accuracy : float
(* Defaults:
let _accuracy = defaultArg accuracy 0,01
*)
-> Fraction
No code example is currently available or this language may not be supported.
- value Decimal
-
The decimal value.
- accuracy Double (Optional)
-
Specifies the maximum relative (not the absolute) error.
An accuracy of 0.01 would find a fraction within 1% of the value.
Default value is: 0.01
Fraction
The resulting
Fraction.