Skip to content

Commit

Permalink
Update src/optimal_retention.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Luc Mcgrady <[email protected]>
  • Loading branch information
L-M-Sherlock and Luc-Mcgrady authored Dec 25, 2024
1 parent 661d74d commit d339eb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/optimal_retention.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub fn simulate(
// Guards
if card.due >= learn_span as f32 {
if !is_learn {
let delta_t = learn_span - last_date_index;
let delta_t = learn_span.max(last_date_index) - last_date_index;
let pre_sim_days = (-card.last_date) as usize;
for i in 0..delta_t {
memorized_cnt_per_day[last_date_index + i] +=
Expand Down

0 comments on commit d339eb1

Please sign in to comment.