Skip to content

Commit eaded2b

Browse files
committed
Use 3sf not 2dp
1 parent 7a4f0a2 commit eaded2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/folders-classic.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function update_bar_text() {
4747
let total = correct + wrong;
4848
let percentage = correct / total * 100;
4949
document.getElementById("progress-bar-text").innerHTML =
50-
`${correct}/${total} (${percentage.toFixed(2)}%)`;
50+
`${correct}/${total} (${percentage.toPrecision(3)}%)`;
5151
set_progress_bar_background(percentage);
5252
}
5353

@@ -204,7 +204,7 @@ function finish_classic_game() {
204204
let finish_div = document.createElement("div");
205205
finish_div.innerHTML = `
206206
<div id="score-div">
207-
<h3>${correct}/${correct + wrong} (${(correct / ((correct + wrong) || 1) * 100).toFixed(2)}%)</h3>
207+
<h3>${correct}/${correct + wrong} (${(correct / ((correct + wrong) || 1) * 100).toPrecision(3)}%)</h3>
208208
</div>
209209
<div id="restart-button-div">
210210
<button class="start-button" id="classic-restart-button">Restart!</button>

0 commit comments

Comments
 (0)