From f06aa00240d59d4d15b9cf4d2736f2058d5133bc Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 19 Jan 2021 00:22:02 -0700 Subject: [PATCH] Fix percentage calculation --- src/utils/numbers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/numbers.ts b/src/utils/numbers.ts index c8b9e7248f..6ba19d0bef 100644 --- a/src/utils/numbers.ts +++ b/src/utils/numbers.ts @@ -38,5 +38,5 @@ export function percentageWithin(pct: number, min: number, max: number): number } export function percentageOf(val: number, min: number, max: number): number { - return (val - min) / max; + return (val - min) / (max - min); }