1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Fixed formatting small negative numbers

This commit is contained in:
Harley White 2021-06-28 11:31:35 -04:00
parent eb890f0cfc
commit 1a172ad61d
2 changed files with 3 additions and 1 deletions

View file

@ -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.

View file

@ -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()