aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/components')
-rw-r--r--frontend/app/components/Gaming/ScoreBar.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/app/components/Gaming/ScoreBar.tsx b/frontend/app/components/Gaming/ScoreBar.tsx
index 4eac3ad..cacdd50 100644
--- a/frontend/app/components/Gaming/ScoreBar.tsx
+++ b/frontend/app/components/Gaming/ScoreBar.tsx
@@ -14,7 +14,12 @@ export default function ScoreBar({ scoreA, scoreB, bgA, bgB }: Props) {
} else if (scoreB === null) {
scoreRatio = 100;
} else {
- scoreRatio = (scoreB / (scoreA + scoreB)) * 100;
+ const rawRatio = scoreB / (scoreA + scoreB);
+ const k = 3.0;
+ const emphasizedRatio =
+ Math.pow(rawRatio, k) /
+ (Math.pow(rawRatio, k) + Math.pow(1 - rawRatio, k));
+ scoreRatio = emphasizedRatio * 100;
}
return (