mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 22:13:58 -05:00
Apply patch from user1823
This commit is contained in:
parent
da9e0d5393
commit
78be762163
1 changed files with 3 additions and 3 deletions
|
|
@ -83,7 +83,7 @@ impl ReviewState {
|
||||||
} else {
|
} else {
|
||||||
let (minimum, maximum) = ctx.min_and_max_review_intervals(ctx.minimum_lapse_interval);
|
let (minimum, maximum) = ctx.min_and_max_review_intervals(ctx.minimum_lapse_interval);
|
||||||
let interval = ctx.with_review_fuzz(
|
let interval = ctx.with_review_fuzz(
|
||||||
(self.scheduled_days as f32) * ctx.lapse_multiplier,
|
(self.scheduled_days.max(1.0) as f32) * ctx.lapse_multiplier,
|
||||||
minimum,
|
minimum,
|
||||||
maximum,
|
maximum,
|
||||||
);
|
);
|
||||||
|
|
@ -211,7 +211,7 @@ impl ReviewState {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn passing_nonearly_review_intervals(self, ctx: &StateContext) -> (u32, u32, u32) {
|
fn passing_nonearly_review_intervals(self, ctx: &StateContext) -> (u32, u32, u32) {
|
||||||
let current_interval = self.scheduled_days as f32;
|
let current_interval = self.scheduled_days.max(1.0) as f32;
|
||||||
let days_late = self.days_late().max(0) as f32;
|
let days_late = self.days_late().max(0) as f32;
|
||||||
|
|
||||||
// hard
|
// hard
|
||||||
|
|
@ -251,7 +251,7 @@ impl ReviewState {
|
||||||
/// FIXME: this needs reworking in the future; it overly penalizes reviews
|
/// FIXME: this needs reworking in the future; it overly penalizes reviews
|
||||||
/// done shortly before the due date.
|
/// done shortly before the due date.
|
||||||
fn passing_early_review_intervals(self, ctx: &StateContext) -> (u32, u32, u32) {
|
fn passing_early_review_intervals(self, ctx: &StateContext) -> (u32, u32, u32) {
|
||||||
let scheduled = self.scheduled_days as f32;
|
let scheduled = self.scheduled_days.max(1.0) as f32;
|
||||||
let elapsed = (self.scheduled_days as f32) + (self.days_late() as f32);
|
let elapsed = (self.scheduled_days as f32) + (self.days_late() as f32);
|
||||||
|
|
||||||
let hard_interval = {
|
let hard_interval = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue