mirror of https://github.com/vector-im/riot-web
Fix percentage calculation
parent
ab51404421
commit
f06aa00240
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue