1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Fix percentage calculation

This commit is contained in:
Travis Ralston
2021-01-19 00:22:02 -07:00
parent ab51404421
commit f06aa00240

View File

@@ -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);
}