fixed 1.0.0 copy "fixed: ^1.0.0" to clipboard
fixed: ^1.0.0 copied to clipboard

outdated

Fixed scale decimal numbers. Fixed.parse(\"1.234\", scale: 2).formatIntl(\"en-AUS\") == 1.23

1.0.0-beta4 #

  • Renamed Fixed.from to Fixed.fromNum for consistency with other ctor names.
  • Fixed.fromNum now throws an AmountTooLargeException.
  • Fixed.fromMinorUnits has been renamed Fixed.fromInt
  • Added tests for rescaling and rounding when rescaling.
  • change rescale to round rather than truncate as the truncation was causing unexpected results (e.g. rounding errors).
  • fix issue with decimal without precision

1.0.0-beta3 #

  • changes the underlying implementation to use the decimal package Thanks to Alexandre Ardhuin for the significant contribution that made this possible :)
  • Created statics for one, two and zero. Created consts for maxInt and minInt. Added ~/, %, remainder, abs, sign, pow, toInt
  • change thousandSeparator to groupSeparator as this is the more generally used term
  • Changed Fixed.fromBigInt to take minor units rather than major units as I found I was constantly misusing it. I think actually makes more sense you can always BigInt.toInt and Fixed.from to create a fixed from a BigInt.
  • Fixed the formatter for small -ve numbers. Added a 'decimalPart' method to return just the decimal component of the fixed no. Renamed majorUnits to 'integerPart'

1.0.0-beta2 #

Improved the documentation.

1.0.0-beta1 #

First release of Fixed.

5
likes
0
pub points
77%
popularity

Publisher

verified publisheronepub.dev

Fixed scale decimal numbers. Fixed.parse(\"1.234\", scale: 2).formatIntl(\"en-AUS\") == 1.23

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

decimal, intl

More

Packages that depend on fixed