Skip to content

Commit

Permalink
formatNumber() now uses roundSignificant() when precision is not
Browse files Browse the repository at this point in the history
specified
  • Loading branch information
adufilie committed Sep 15, 2014
1 parent a387f12 commit 8e6206d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions WeaveCore/src/weave/compiler/StandardLib.as
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ package weave.compiler
}
else
{
number = StandardLib.roundSignificant(number);
if (Math.abs(number) < 1)
return String(number); // this fixes the bug where "0.1" gets converted to ".1" (we don't want the "0" to be lost)
_numberFormatter.precision = -1;
Expand Down

0 comments on commit 8e6206d

Please sign in to comment.