-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: format bignumber to engineering bug Add tests for correctly handling starting with more then 3 sig figs and targeting 1 or 2 sig figs * lint: * lint: reduce number literal sig figs * fix: engineering notation for bignumber input Corrects handling of cases where the input has 3 or more sig figs and the output is set to 1 or 2 sig figs. * test: add negative format bignumber precision test * fix: use BigNumber for all branches in toEngineering Also, remove string type option from JSDoc for toEngineering since string does support the required interface for the function (the .e property, .mul member function, and the .constructor property would not be correct after this change) * fix: precision 0 for fixed notation and bignumber This fix differentiates precision === 0 and precision === undefined to. After fix, format bignumber for precision 0 matches format number for precision 0. Tests added as well --------- Co-authored-by: Jos de Jong <[email protected]>
- Loading branch information
1 parent
3c59d1a
commit 6fa5890
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters