Skip to content

Commit

Permalink
#209 toPrecision without argument should follow toString
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcl committed Jan 9, 2019
1 parent 01bfc34 commit c324fc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bignumber.js
Expand Up @@ -1199,7 +1199,7 @@

if (i == null) {
str = coeffToString(n.c);
str = id == 1 || id == 2 && ne <= TO_EXP_NEG
str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)
? toExponential(str, ne)
: toFixedPoint(str, ne, '0');
} else {
Expand Down
2 changes: 1 addition & 1 deletion bignumber.mjs
Expand Up @@ -1195,7 +1195,7 @@ function clone(configObject) {

if (i == null) {
str = coeffToString(n.c);
str = id == 1 || id == 2 && ne <= TO_EXP_NEG
str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS)
? toExponential(str, ne)
: toFixedPoint(str, ne, '0');
} else {
Expand Down

0 comments on commit c324fc8

Please sign in to comment.