mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Revert "Ensure minimum doesn't exceed maximum"
This reverts commit37ce4e8426
. Also remove a stale comment that is no longer relevant afterb8ec76fb66
This commit is contained in:
parent
6d13221ae5
commit
f98fbbf298
2 changed files with 1 additions and 5 deletions
|
@ -33,7 +33,6 @@ static FUZZ_RANGES: [FuzzRange; 3] = [
|
||||||
|
|
||||||
impl<'a> StateContext<'a> {
|
impl<'a> StateContext<'a> {
|
||||||
/// Apply fuzz, respecting the passed bounds.
|
/// Apply fuzz, respecting the passed bounds.
|
||||||
/// Caller must ensure reasonable bounds.
|
|
||||||
pub(crate) fn with_review_fuzz(&self, interval: f32, minimum: u32, maximum: u32) -> u32 {
|
pub(crate) fn with_review_fuzz(&self, interval: f32, minimum: u32, maximum: u32) -> u32 {
|
||||||
with_review_fuzz(self.fuzz_factor, interval, minimum, maximum)
|
with_review_fuzz(self.fuzz_factor, interval, minimum, maximum)
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,11 +135,8 @@ impl RelearnState {
|
||||||
fn answer_easy(self, ctx: &StateContext) -> ReviewState {
|
fn answer_easy(self, ctx: &StateContext) -> ReviewState {
|
||||||
let scheduled_days = if let Some(states) = &ctx.fsrs_next_states {
|
let scheduled_days = if let Some(states) = &ctx.fsrs_next_states {
|
||||||
let (mut minimum, maximum) = ctx.min_and_max_review_intervals(1);
|
let (mut minimum, maximum) = ctx.min_and_max_review_intervals(1);
|
||||||
// ensure 1 greater than good where possible
|
|
||||||
let good = ctx.with_review_fuzz(states.good.interval as f32, minimum, maximum);
|
let good = ctx.with_review_fuzz(states.good.interval as f32, minimum, maximum);
|
||||||
if minimum < maximum {
|
minimum = good + 1;
|
||||||
minimum = good + 1;
|
|
||||||
}
|
|
||||||
let interval = states.easy.interval;
|
let interval = states.easy.interval;
|
||||||
ctx.with_review_fuzz(interval as f32, minimum, maximum)
|
ctx.with_review_fuzz(interval as f32, minimum, maximum)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue