fn new_interval_learnt(&self, settings: &settings::TagSettings, score: Score, priority: Priority, modifier: Ease, max_interval: chrono::Duration) -> chrono::Duration {
        debug_assert!(score != Score::Fail);

        // Calculate unsaturated new interval. This formula is based on the SM2 algorithm.
        let new_int = chrono::Duration::minutes((self.current_interval.num_minutes() as f32
            * self.new_ease(settings, score)
            * modifier
            * settings.interval_modifier
            * settings.score_modifiers[score as usize]
            * settings.priority_modifiers[priority as usize]) as i64);

        // Saturate the new interval according to the chosen settings.
        cmp::min(max_interval, if new_int > settings.max_interval {
            settings.max_interval
        } else if new_int - self.current_interval < settings.min_interval_increase {
            self.current_interval + settings.min_interval_increase
        } else {
            new_int
        })
    }
/// Calculate new interval after nonfailed review assuming that `self.state` is `Learnt`.
Calculate new interval after nonfailed review assuming that `self.state` is `Learnt`.
Calculate new interval after nonfailed review assuming that ` self . state ` is ` Learnt ` .
fn new_interval_learnt(&self, settings: &settings::TagSettings, score: Score, priority: Priority, modifier: Ease, max_interval: chrono::Duration) -> chrono::Duration {
        debug_assert!(score != Score::Fail);
        // Calculate unsaturated new interval. This formula is based on the SM2 algorithm.
        let new_int = chrono::Duration::minutes((self.current_interval.num_minutes() as f32
            * self.new_ease(settings, score)
            * modifier
            * settings.interval_modifier
            * settings.score_modifiers[score as usize]
            * settings.priority_modifiers[priority as usize]) as i64);
        // Saturate the new interval according to the chosen settings.
        cmp::min(max_interval, if new_int > settings.max_interval {
            settings.max_interval
        } else if new_int - self.current_interval < settings.min_interval_increase {
            self.current_interval + settings.min_interval_increase
        } else {
            new_int
        })
    }
fn new_interval_learnt ( & self , settings : & settings :: TagSettings , score : Score , priority : Priority , modifier : Ease , max_interval : chrono :: Duration ) -> chrono :: Duration { debug_assert ! ( score Score Fail ) ; // Calculate unsaturated new interval. This formula is based on the SM2 algorithm. let new_int = chrono :: Duration :: minutes ( ( self . current_interval . num_minutes ( ) as f32 * self . new_ease ( settings , score ) * modifier * settings . interval_modifier * settings . score_modifiers [ score as usize ] * settings . priority_modifiers [ priority as usize ] ) as i64 ) ; // Saturate the new interval according to the chosen settings. cmp :: min ( max_interval , if new_int > settings . max_interval { settings . max_interval } else if new_int - self . current_interval < settings . min_interval_increase { self . current_interval + settings . min_interval_increase } else { new_int } ) }
Calculate new interval after nonfailed review assuming that `self.state` is `Learnt`.
Calculate new interval after nonfailed review assuming that ` self . state ` is ` Learnt ` .
&self
settings
&settings::TagSettings
score
Score
priority
Priority
modifier
Ease
max_interval
chrono::Duration
&self
settings
&settings::TagSettings
score
Score
priority
Priority
modifier
Ease
max_interval
chrono::Duration