mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 16:13:49 +01:00
Fixed formatAbsurdNumber
This commit is contained in:
parent
75227233f3
commit
1b6058dd0a
@ -52,7 +52,7 @@ class NumeralFormatter {
|
|||||||
return this.format(n, "0.000a");
|
return this.format(n, "0.000a");
|
||||||
}
|
}
|
||||||
|
|
||||||
formatAbsurdNumber(n: number, decimalPlaces: string): string {
|
formatAbsurdNumber(n: number, decimalPlaces: number): string {
|
||||||
for(let i = 0; i < extraFormats.length; i++) {
|
for(let i = 0; i < extraFormats.length; i++) {
|
||||||
if(extraFormats[i] < n && n <= extraFormats[i]*1000) {
|
if(extraFormats[i] < n && n <= extraFormats[i]*1000) {
|
||||||
return this.format(n/extraFormats[i], '0.'+'0'.repeat(decimalPlaces))+extraNotations[i];
|
return this.format(n/extraFormats[i], '0.'+'0'.repeat(decimalPlaces))+extraNotations[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user