Skip to content

Commit 8dde292

Browse files
authored
DogeisCut/FormatNumbers: Resolve AD notation inconsistencies (#2331)
Resolves: #2328 Results: 10^33: 1Dc 10^36: 1 UDc 10^45: 1 QaDc 10^48: 1 QnDc See https://pastebin.com/JpUFnLtp for full results, please let me know if you see anything wrong as I can not locate the resource I was previously using to verify this.
1 parent 085312c commit 8dde292

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

extensions/DogeisCut/FormatNumbers.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@
5656
"No",
5757
"Dc",
5858
];
59-
const unitPrefixes = ["U", "D", "T", "Qa", "Qt", "Sx", "Sp", "O", "N"];
59+
const unitPrefixes = ["U", "D", "T", "Qa", "Qn", "Sx", "Sp", "O", "N"];
6060
const tensPrefixes = [
6161
"Dc",
6262
"Vg",
6363
"Tg",
6464
"Qd",
65-
"Qi",
65+
"Qn",
6666
"Se",
6767
"St",
6868
"Og",
@@ -98,7 +98,7 @@
9898
);
9999
}
100100

101-
const illionNumber = Math.floor(Math.log10(Math.abs(number)) / 3);
101+
const illionNumber = Math.floor(Math.log10(Math.abs(number)) / 3) - 1;
102102
let illionString = "";
103103

104104
if (illionNumber <= 999) {
@@ -108,8 +108,8 @@
108108

109109
illionString =
110110
(hundreds > 0 ? hundredsPrefixes[hundreds - 1] : "") +
111-
(tens > 0 ? tensPrefixes[tens - 1] : "") +
112-
(units > 0 ? unitPrefixes[units - 1] : "");
111+
(units > 0 ? unitPrefixes[units - 1] : "") +
112+
(tens > 0 ? tensPrefixes[tens - 1] : "");
113113
} else {
114114
const tier2Index = Math.floor(illionNumber / 1000);
115115
const tier2Remainder = illionNumber % 1000;

0 commit comments

Comments
 (0)