From f902096d9d01ff2625b92366c71c5493fd8f175c Mon Sep 17 00:00:00 2001 From: wktr <94459237+WiktorProj@users.noreply.github.com> Date: Sun, 8 Sep 2024 17:11:26 +0200 Subject: [PATCH] Update NumberFormating.js --- MeTMT/js/utils/NumberFormating.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MeTMT/js/utils/NumberFormating.js b/MeTMT/js/utils/NumberFormating.js index 412bbc7..8f3cf6f 100644 --- a/MeTMT/js/utils/NumberFormating.js +++ b/MeTMT/js/utils/NumberFormating.js @@ -142,15 +142,15 @@ function standardFormat(decimal) { [ "", "C", "D", "Tc", "Qc", "qc", "Sc", "sc", "Oc", "Nc" ], - [ - "", "Mi", "D-Mi", "T-Mi", "Q-Mi", "q-Mi", "S-Mi", "s-Mi", "O-Mi", "N-Mi" - ], ] decimal = new Decimal(decimal) if (decimal.eq(0)) return "0" e = decimal.log10().div(3).floor().clampMin(0) prefix = "" - prefix += symbols[3][e.div(1000).floor().mod(10)] + prefix += symbols[0][e.div(10000).floor().mod(10)] + prefix += symbols[1][e.div(100000).floor().mod(10)] + prefix += symbols[2][e.div(1000000).floor().mod(10)] + prefix += e.div(1000).floor().mod(10).neq(0) ? "Mi" : "" prefix += symbols[0][e.sub(1).mod(10)] prefix += symbols[1][e.div(10).floor().mod(10)] prefix += symbols[2][e.div(100).floor().mod(10)]