From eaded2b50f7cdc3385f73ea61d093cd4403e3c89 Mon Sep 17 00:00:00 2001 From: nayakrujul Date: Fri, 5 Jul 2024 15:42:24 +0530 Subject: [PATCH] Use 3sf not 2dp --- scripts/folders-classic.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/folders-classic.js b/scripts/folders-classic.js index 237b5ee..ffb30c6 100644 --- a/scripts/folders-classic.js +++ b/scripts/folders-classic.js @@ -47,7 +47,7 @@ function update_bar_text() { let total = correct + wrong; let percentage = correct / total * 100; document.getElementById("progress-bar-text").innerHTML = - `${correct}/${total} (${percentage.toFixed(2)}%)`; + `${correct}/${total} (${percentage.toPrecision(3)}%)`; set_progress_bar_background(percentage); } @@ -204,7 +204,7 @@ function finish_classic_game() { let finish_div = document.createElement("div"); finish_div.innerHTML = `
-

${correct}/${correct + wrong} (${(correct / ((correct + wrong) || 1) * 100).toFixed(2)}%)

+

${correct}/${correct + wrong} (${(correct / ((correct + wrong) || 1) * 100).toPrecision(3)}%)