mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Fix ratings calculator
This commit is contained in:
@@ -70,6 +70,7 @@ export const TournamentResults = ({
|
||||
game.result as 1 | 0 | 0.5,
|
||||
kFactor,
|
||||
);
|
||||
|
||||
return {
|
||||
rating: acc.rating + delta,
|
||||
deltas: [
|
||||
|
||||
@@ -67,7 +67,7 @@ export const getNewRating = (
|
||||
result: 1 | 0 | 0.5,
|
||||
kFactor: number,
|
||||
) => {
|
||||
const differenceInElo = clamp(opponentRating - rating, -400, 400);
|
||||
const differenceInElo = clamp(opponentRating - rating, -400, Infinity);
|
||||
const tableRow = (differenceToProbability.find(
|
||||
([start, end]) =>
|
||||
Math.abs(differenceInElo) >= start && Math.abs(differenceInElo) <= end,
|
||||
|
||||
Reference in New Issue
Block a user