Skip to content

Commit

Permalink
max rating to 9999
Browse files Browse the repository at this point in the history
Former-commit-id: 6f15a07
  • Loading branch information
HenryQuan committed Dec 2, 2019
1 parent 94b3791 commit 11ab219
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WoWsInfo/src/core/util/PersonalRating.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const calRating = (actualDmg, expectedDmg, actualWins, expectedWins, actualFrags
const nWins = Math.max(0, (rWins - 0.7) / (1 - 0.7));

let rating = roundTo(700 * nDmg + 300 * nFrags + 150 * nWins);
return Number(rating);
// Cap it to 9999
return Math.min(Number(rating), 9999);
};

/**
Expand Down

0 comments on commit 11ab219

Please sign in to comment.