mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 11:10:58 +02:00
BUGFIX: Corrected error in formatReallyBigNumber and updated BB UI to be more large number friendly (#331)
This commit is contained in:
@@ -61,7 +61,7 @@ class NumeralFormatter {
|
||||
const nAbs = Math.abs(n as number);
|
||||
if (n === Infinity) return "∞";
|
||||
for (let i = 0; i < extraFormats.length; i++) {
|
||||
if (extraFormats[i] < nAbs && nAbs <= extraFormats[i] * 1000) {
|
||||
if (extraFormats[i] <= nAbs && nAbs < extraFormats[i] * 1000) {
|
||||
return this.format((n as number) / extraFormats[i], "0." + "0".repeat(decimalPlaces)) + extraNotations[i];
|
||||
}
|
||||
}
|
||||
@@ -152,11 +152,11 @@ class NumeralFormatter {
|
||||
}
|
||||
|
||||
formatPopulation(n: number): string {
|
||||
return this.format(n, "0.000a");
|
||||
return this.formatReallyBigNumber(n);
|
||||
}
|
||||
|
||||
formatStamina(n: number): string {
|
||||
return this.format(n, "0.0");
|
||||
return this.formatReallyBigNumber(n);
|
||||
}
|
||||
|
||||
formatShares(n: number): string {
|
||||
|
||||
Reference in New Issue
Block a user