reverted raw change

This commit is contained in:
Miodec 2021-03-08 18:09:46 +00:00
parent 25f6a938a4
commit fa73e37670

View file

@ -1766,16 +1766,13 @@ function calculateStats() {
let wpm = Misc.roundTo2(
((chars.correctWordChars + chars.correctSpaces) * (60 / testSeconds)) / 5
);
// let wpmraw = Misc.roundTo2(
// ((chars.allCorrectChars +
// chars.spaces +
// chars.incorrectChars +
// chars.extraChars) *
// (60 / testSeconds)) /
// 5
// );
let wpmraw = Misc.roundTo2(
rawHistory.reduce((a, b) => a + b, 0) / rawHistory.length
((chars.allCorrectChars +
chars.spaces +
chars.incorrectChars +
chars.extraChars) *
(60 / testSeconds)) /
5
);
let acc = Misc.roundTo2(
(accuracyStats.correct /
@ -3452,8 +3449,7 @@ function liveWpmAndRaw() {
let testNow = performance.now();
let testSeconds = (testNow - testStart) / 1000;
let wpm = Math.round(((correctWordChars + spaces) * (60 / testSeconds)) / 5);
// let raw = Math.round(((chars + spaces) * (60 / testSeconds)) / 5);
let raw = Math.round((currentKeypress.count * (60 / 1)) / 5);
let raw = Math.round(((chars + spaces) * (60 / testSeconds)) / 5);
return {
wpm: wpm,
raw: raw,