Skip to content

Commit ad552f3

Browse files
authored
Update index.html
offsetWordCountまわりの計算式の不統一を調整
1 parent bf0638c commit ad552f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ <h2>カスタムモード</h2>
7777
currentHours - (startHours + startMinutes / 60);
7878
let timeProgressRate = elapsedTimeInHours / differenceInHours;
7979
let needWordCount = Math.round(
80-
targetWordCount * timeProgressRate + offsetWordCount
80+
(targetWordCount - offsetWordCount) * timeProgressRate + offsetWordCount
8181
);
8282
document.getElementById(
8383
"wordsToWrite"
8484
).innerHTML = `要求文字数: ${needWordCount}字`;
8585

86-
let wordsPerHour = Math.round((targetWordCount - offsetWordCount) / differenceInHours);
86+
let wordsPerHour = Math.round(targetWordCount / differenceInHours);
8787
document.getElementById(
8888
"wordsPerHour"
8989
).innerHTML = `時速: ${wordsPerHour}字`;

0 commit comments

Comments
 (0)