numeric_utils 0.2.0
numeric_utils: ^0.2.0 copied to clipboard
Provides extensions and utility functions for working with numeric types in Dart, including Rational and BigInt.
0.2.0 - 2025-03-05 #
Added #
RationalParsing.fromString: A new utility method that parses strings intoRationalobjects, supporting the output ofRational.toString(e.g., fractions like "3/4", mixed numbers like "1 3/4") as well as formats parsable byRational.parse(e.g., integers, decimals, scientific notation). Enables round-trip serialization for JSON and other formats.
0.1.0 - 2025-02-23 #
- Initial version of numeric_utils.
- Features:
- Added
RationalRoundingExtensionwith various rounding methods (rounded,toNearest, etc.).- Added
RoundingModeenum.
- Added
- Added
BigIntRoundedDivisionExtensionfor rounded division of BigInts. - Added
RationalFormattingExtensionwithtoDecimalPlaces,toCurrencyandtoPercentagemethods. - Added
RationalCommonRoundingExtensionwithtoDecimalPlace,toCents,toNearestHalf,toNearestThird, andtoNearestQuartermethods. - Added
BigIntMultipleOfExtensionandIntMultipleOfExtensionforisMultipleOfmethods.
- Added
- Constants:
- Added
RationalConstantswith common rational values as well asIntConstantsandBigIntConstants
- Added