mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 05:52:22 -04:00
Fix/Simulator intervals decending overflows (#4275)
* Fix/Simulator intervals decending overflows * saturating_sub * oops
This commit is contained in:
parent
359231a4d8
commit
211cbfe660
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ fn create_review_priority_fn(
|
|||
|
||||
// Interval-based ordering
|
||||
IntervalsAscending => wrap!(|c, _w| c.interval as i32),
|
||||
IntervalsDescending => wrap!(|c, _w| -(c.interval as i32)),
|
||||
IntervalsDescending => wrap!(|c, _w| (c.interval as i32).saturating_neg()),
|
||||
// Retrievability-based ordering
|
||||
RetrievabilityAscending => {
|
||||
wrap!(move |c, w| (c.retrievability(w) * 1000.0) as i32)
|
||||
|
|
Loading…
Reference in a new issue