mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-28 11:01:43 +00:00
Fixed precision displaying wrong
This commit is contained in:
parent
38391cac2a
commit
f5213e8158
2 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
# The Modding Tree changelog:
|
# The Modding Tree changelog:
|
||||||
|
|
||||||
|
- Fixed some numbers not displaying with enough digits.
|
||||||
|
|
||||||
### v2.1.3.1 - 10/21/20
|
### v2.1.3.1 - 10/21/20
|
||||||
- Fixed the update function.
|
- Fixed the update function.
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,8 @@ function format(decimal, precision=2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatWhole(decimal) {
|
function formatWhole(decimal) {
|
||||||
|
decimal = new Decimal(decimal)
|
||||||
|
if (decimal.gte(1e9)) return format(decimal, 2)
|
||||||
return format(decimal, 0)
|
return format(decimal, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue