File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff 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>
You can’t perform that action at this time.
0 commit comments