← Back to list of members


 Method (no overloads)


Tries to find a pair of two Integers
(which are components that make up a Rational)
so that its rational value is equal to num.
To set some options for this function, you can use
MaxAbsNumeratorOrDenominatorValue to limit the absolute value of both denominator and numerator.

Parameter "num"

e.g. 1.5m -> 3/2

Parameter "iterCount"

Number of iterations allowed to be spent for searching the rational.
A higher value indicates a higher probability that it will find a Rational.
Defaults to FloatToRationalIterCount.


Rational if found, null otherwise.

Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online