From f64407b36a6bc5ba238e42fdb700aae10fa3ba3a Mon Sep 17 00:00:00 2001 From: aome510 <40011582+aome510@users.noreply.github.com> Date: Wed, 22 Apr 2020 20:48:12 -0400 Subject: [PATCH] change score round in scoreboard and overview (#14) * change score round in scoreboard and overview --- frontend/html/contests/overview.html | 2 +- frontend/ts/scoreboard/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/html/contests/overview.html b/frontend/html/contests/overview.html index ef0473a..e8308de 100644 --- a/frontend/html/contests/overview.html +++ b/frontend/html/contests/overview.html @@ -42,7 +42,7 @@ {{ with (index $scores .ID) }} - {{ .Score }} + {{ .Score | printf "%.2f" }} {{ if .Penalty }} (+{{ .Penalty}}) {{ end }} diff --git a/frontend/ts/scoreboard/index.tsx b/frontend/ts/scoreboard/index.tsx index 5a665b9..b576951 100644 --- a/frontend/ts/scoreboard/index.tsx +++ b/frontend/ts/scoreboard/index.tsx @@ -48,7 +48,7 @@ interface ProblemResult { * Formats the score into a friendlier string. */ function fmtScore(s: number): string { - return `${Math.round(s * 10) / 10}`; + return `${Math.round(s * 100) / 100}`; } /**