We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 200692d commit e7a02cfCopy full SHA for e7a02cf
packages/courseware/src/typing/questions/single-letter/index.ts
@@ -71,8 +71,9 @@ export class TypeLetterQuestion extends Question {
71
if (t < 3000) {
72
return 1.0;
73
} else {
74
- // scale from 1 at 3s to 0.25 at 10s
75
- return 1 - ((t - 3000) / 7000) * 0.75;
+ // scale from 1 at 3s to 0.25 at 10s, clamped to [0.25, 1]
+ const skill = 1 - ((t - 3000) / 7000) * 0.75;
76
+ return Math.max(0.25, skill);
77
}
78
79
return 0;
0 commit comments