Skip to content

Commit

Permalink
Bug fix: If the score is exactly 100, the attempt does not end up in …
Browse files Browse the repository at this point in the history
…the bar graph
  • Loading branch information
torinfo committed Apr 18, 2024
1 parent 0377485 commit bdba942
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -2192,6 +2192,10 @@
barOwnScore = barSizeData.slice();
for (let i = 0; i < statements.length; i++) {
let ind = Math.floor(statements[i].result.score.raw / Math.ceil(100 / nrbars));
if (ind >= Number(nrbars))
{
ind = Number(nrbars) - 1;
}
barSizeData[ind] += 1;
groupAvg[ind] += statements[i].result.score.raw;
tempTotal += 1;
Expand Down Expand Up @@ -2478,6 +2482,10 @@

for (let i = 0; i < statements.length; i++) {
let ind = Math.floor(statements[i].result.score.raw / Math.ceil(100 / nrbars));
if (ind >= Number(nrbars))
{
ind = Number(nrbars) - 1;
}
barSizeData[ind] += 1;
groupAvg[ind] += statements[i].result.score.raw;
if (statements[i] == ownstatements[0]) {
Expand Down

0 comments on commit bdba942

Please sign in to comment.