Crate rational_extensions
source ·Expand description
This crate extends how num_rational::Ratio<T>
can be converted
from a string specifically by allowing decimal notation with the
ability to constrain the minimum and maximum number of fractional
digits allowed.
Modules
- rational
rational
Structs
- An ordered pair whose first value is <= to the second.
Enums
- The error returned when parsing a string in decimal notation into a
num_rational::Ratio<T>
. - The error returned when parsing a string in decimal or rational notation into a
num_rational::Ratio<T>
.
Functions
- Returns a
String
representingval
in decimal notation withfrac_digit_count
fractional digits using normal rounding rules. - Converts a string in decimal notation into a
Ratio<T>
. - Converts a string in rational or decimal notation into a
Ratio<T>
.