Skip to content

Commit ae1bea3

Browse files
committed
Round leaderboard points
1 parent f1b02f3 commit ae1bea3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/reports/topcoder/topcoder-reports.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ export class TopcoderReportsService implements OnModuleDestroy {
10701070
row.durationDays * (filters.pointsPerDay ?? 0);
10711071
const relativeRank = row.placement / Math.max(1, row.submissionsCount);
10721072
const sqrt = Math.sqrt(relativeRank);
1073-
const pointsByWin = log / sqrt;
1073+
const pointsByWin = Math.round(log / sqrt);
10741074

10751075
entriesByUser[row.userId].points += pointsByWin;
10761076
entriesByUser[row.userId].wins[row.challengeId] = pointsByWin;

0 commit comments

Comments
 (0)