dkl9 commited on 2024-21 06:43:15
Showing 2 changed files, with 5 additions and 5 deletions.
| ... | ... |
@@ -41,7 +41,7 @@ function Card:fromrecs(recs, conf) |
| 41 | 41 |
card = cc, |
| 42 | 42 |
ind = m, |
| 43 | 43 |
time = tonumber((rec.LastReview or {})[ctr]),
|
| 44 |
- delay = tonumber((rec.LastDelay or {})[ctr]),
|
|
| 44 |
+ delay = math.floor(tonumber((rec.LastDelay or {})[ctr])),
|
|
| 45 | 45 |
succ = tonumber((rec.Successes or {})[ctr]),
|
| 46 | 46 |
fail = tonumber((rec.Failures or {})[ctr]),
|
| 47 | 47 |
ease = tonumber((rec.Ease or {})[ctr]),
|
| ... | ... |
@@ -63,7 +63,7 @@ function Card:fromrecs(recs, conf) |
| 63 | 63 |
card = cc, |
| 64 | 64 |
ind = { segs[i == 1 and #segs or i - 1], m },
|
| 65 | 65 |
time = tonumber((rec.LastReview or {})[ctr]),
|
| 66 |
- delay = tonumber((rec.LastDelay or {})[ctr]),
|
|
| 66 |
+ delay = math.floor(tonumber((rec.LastDelay or {})[ctr])),
|
|
| 67 | 67 |
succ = tonumber((rec.Successes or {})[ctr]),
|
| 68 | 68 |
fail = tonumber((rec.Failures or {})[ctr]),
|
| 69 | 69 |
ease = tonumber((rec.Ease or {})[ctr]),
|
| ... | ... |
@@ -89,7 +89,7 @@ function Card:fromrecs(recs, conf) |
| 89 | 89 |
card = cc, |
| 90 | 90 |
ind = { n, m },
|
| 91 | 91 |
time = tonumber((rec.LastReview or {})[ctr]),
|
| 92 |
- delay = tonumber((rec.LastDelay or {})[ctr]),
|
|
| 92 |
+ delay = math.floor(tonumber((rec.LastDelay or {})[ctr])),
|
|
| 93 | 93 |
succ = tonumber((rec.Successes or {})[ctr]),
|
| 94 | 94 |
fail = tonumber((rec.Failures or {})[ctr]),
|
| 95 | 95 |
ease = tonumber((rec.Ease or {})[ctr]),
|
| ... | ... |
@@ -108,7 +108,7 @@ function Card:fromrecs(recs, conf) |
| 108 | 108 |
card = cc, |
| 109 | 109 |
ind = n + 1, |
| 110 | 110 |
time = tonumber((rec.LastReview or {})[ctr]),
|
| 111 |
- delay = tonumber((rec.LastDelay or {})[ctr]),
|
|
| 111 |
+ delay = math.floor(tonumber((rec.LastDelay or {})[ctr])),
|
|
| 112 | 112 |
succ = tonumber((rec.Successes or {})[ctr]),
|
| 113 | 113 |
fail = tonumber((rec.Failures or {})[ctr]),
|
| 114 | 114 |
ease = tonumber((rec.Ease or {})[ctr]),
|
| ... | ... |
@@ -35,7 +35,7 @@ local function update(prompt, revtime, revsucc, conf) |
| 35 | 35 |
end |
| 36 | 36 |
-- allowed random variation, as a fraction of the "optimal" duration |
| 37 | 37 |
local ARV = conf:get("AllowedRandomVariation") or 0.1
|
| 38 |
- prompt.delay = schedule(prompt, revtime, revsucc, conf) * ((1 - ARV) + 2 * ARV * math.random()) |
|
| 38 |
+ prompt.delay = math.floor(schedule(prompt, revtime, revsucc, conf) * ((1 - ARV) + 2 * ARV * math.random())) |
|
| 39 | 39 |
prompt.ease = prompt.ease + ({ -0.2, -0.15, 0, 0.15 })[2 * revsucc + 1]
|
| 40 | 40 |
prompt.time = revtime |
| 41 | 41 |
end |
| 42 | 42 |