Skip to content

Commit

Permalink
change score round in scoreboard and overview (#14)
Browse files Browse the repository at this point in the history
* change score round in scoreboard and overview
  • Loading branch information
aome510 authored Apr 23, 2020
1 parent 1c4932f commit f64407b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/html/contests/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
</td>
<td class="text-lg py-3 border-b text-center">
{{ with (index $scores .ID) }}
<span class="font-semibold">{{ .Score }}</span>
<span class="font-semibold">{{ .Score | printf "%.2f" }}</span>
{{ if .Penalty }}
<span>(+{{ .Penalty}})</span>
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion frontend/ts/scoreboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}

/**
Expand Down

0 comments on commit f64407b

Please sign in to comment.