Skip to content

Commit

Permalink
Fixed formatting small negative numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Acamaeda committed Jun 28, 2021
1 parent eb890f0 commit 1a172ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# The Modding Tree changelog:

- Fixed formatting for small negative numbers.

# v2.6.4.2 - 6/17/21
- Fixed a bug with the endgame screen.
- Fixed hotkey-related crash.
Expand Down
2 changes: 1 addition & 1 deletion js/utils/NumberFormating.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function format(decimal, precision = 2, small) {
player.hasNaN = true;
return "NaN"
}
if (decimal.sign < 0) return "-" + format(decimal.neg(), precision)
if (decimal.sign < 0) return "-" + format(decimal.neg(), precision, small)
if (decimal.mag == Number.POSITIVE_INFINITY) return "Infinity"
if (decimal.gte("eeee1000")) {
var slog = decimal.slog()
Expand Down

0 comments on commit 1a172ad

Please sign in to comment.