Skip to content

Commit

Permalink
bug/fix-clear (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciripel authored Mar 30, 2023
1 parent cdfde59 commit b1c1100
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.2.2
- Fix `clear()`.
## 0.2.1
- Revert `zero()` cause `const` is very valuable.
## 0.2.0
Expand Down
4 changes: 2 additions & 2 deletions lib/src/sio_big_decimal_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ class BigDecimal extends Equatable implements Comparable<BigDecimal> {
? _copyWith(sign: '')
: _copyWith(sign: '-');

BigDecimal clear() => _copyWith(abs: [0], dec: [], sign: '');
BigDecimal clear() => BigDecimal.zero(precision: precision);

BigDecimal removeValue() {
if (_abs.isEmpty) return _copyWith();
Expand Down Expand Up @@ -496,5 +496,5 @@ class BigDecimal extends Equatable implements Comparable<BigDecimal> {
}

@override
List<Object?> get props => [_sign, _abs, _dec];
List<Object?> get props => [_sign, _abs, _dec, precision];
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sio_big_decimal
description: Numeric library to manipulate very big numbers keeping very high precision.
version: 0.2.1
version: 0.2.2
repository: https://github.com/SimplioOfficial/sio_big_decimal

environment:
Expand Down

0 comments on commit b1c1100

Please sign in to comment.