UtilNumericsConvertToFraction(Double, Double) Method

Converts a decimal number to a Fraction.

Definition

Namespace: DevCase.Core.Math.Common
Assembly: 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(
	double value,
	double accuracy = 0,01
)

Parameters

value  Double
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

Return Value

Fraction
The resulting Fraction.

Remarks

See Also