fix avg pp
All checks were successful
deploy / deploy (push) Successful in 53s

This commit is contained in:
Lee 2023-10-28 00:29:49 +01:00
parent 412c07a304
commit 2835f0713e

@ -206,7 +206,9 @@ export function getAveragePp(playerId: string, limit: number = 20) {
.sort((a, b) => b - a)
.slice(0, limit);
return getTotalPpFromSortedPps(rankedScorePps, 0) / limit;
return (
rankedScorePps.reduce((cum, pp) => cum + pp, 0) / rankedScorePps.length
);
}
/**