oboeru

a collection of simple, scriptable flashcard programs
git clone anongit@rnpnr.xyz:oboeru.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 921e3c4ee5d42bed11db753b77cc52f029685bde
Parent: 5de8d3b32b87889334dd37dbfab4efb404f2087a
Author: Randy Palamar
Date:   Mon, 23 Aug 2021 11:35:54 -0600

oboeru: -1s in MINIMUM test instead of +1s to review time

Diffstat:
Moboeru.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/oboeru.c b/oboeru.c @@ -178,9 +178,9 @@ bump_card(Card *card, int8_t status) switch (status) { case CARD_PASS: - if (diff < MINIMUM_INCREASE) { - /* extra 1s to avoid rounding errors */ - card->due = t + MINIMUM_INCREASE + 1; + /* - 1s to avoid rounding error */ + if (diff < MINIMUM_INCREASE - 1) { + card->due = t + MINIMUM_INCREASE; return 1; } card->due = t + diff * GROWTH_RATE; @@ -189,7 +189,7 @@ bump_card(Card *card, int8_t status) if (diff > LEECH_AGE && !card->nobump) card->leeches++; - if (diff * SHRINK_RATE < MINIMUM_INCREASE) + if (diff * SHRINK_RATE < MINIMUM_INCREASE - 1) card->due = t + MINIMUM_INCREASE + 1; else card->due = t + diff * SHRINK_RATE;