Skip to content

Commit

Permalink
use abs(new_ivl - card.ivl)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-M-Sherlock committed Jun 2, 2024
1 parent 210c60e commit 8883973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schedule/reschedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def reschedule_card(cid, fsrs: FSRS, recompute=False):
fsrs.set_card(card)
fsrs.set_fuzz_factor(cid, card.reps)
new_ivl = fsrs.next_interval(s)
if (new_ivl - card.ivl) / card.ivl < fsrs.reschedule_threshold:
if abs(new_ivl - card.ivl) / card.ivl < fsrs.reschedule_threshold:
return None
due_before = max(card.odue if card.odid else card.due, mw.col.sched.today)
card = update_card_due_ivl(card, new_ivl)
Expand Down

0 comments on commit 8883973

Please sign in to comment.