fix(account page): results being put in the wrong histogram bucket

This commit is contained in:
Miodec 2024-02-01 11:32:51 +01:00
parent f57bac8071
commit 0920010f5e

View file

@ -544,8 +544,8 @@ async function fillContent(): Promise<void> {
}
const bucketSize = typingSpeedUnit.histogramDataBucketSize;
const bucket = Math.round(
typingSpeedUnit.fromWpm(result.wpm) / bucketSize
const bucket = Math.floor(
Math.round(typingSpeedUnit.fromWpm(result.wpm)) / bucketSize
);
//grow array if needed