pub fn generate(segments: &mut [Segment], goal_time: Time, comparison: &str) {
    let mut skill_curve = SkillCurve::new();

    if let Some(real_time) = goal_time.real_time {
        generate_for_timing_method_with_buf(
            segments,
            TimingMethod::RealTime,
            Some(real_time),
            comparison,
            &mut skill_curve,
        );
    } else {
        for segment in &mut *segments {
            segment.comparison_mut(comparison).real_time = None;
        }
    }

    if let Some(game_time) = goal_time.game_time {
        generate_for_timing_method_with_buf(
            segments,
            TimingMethod::GameTime,
            Some(game_time),
            comparison,
            &mut skill_curve,
        );
    } else {
        for segment in &mut *segments {
            segment.comparison_mut(comparison).game_time = None;
        }
    }
}
/// Populates the segments with a goal comparison. The segment history is used
/// to generate comparison times such that they end up with the goal time
/// specified. The values are stored in the comparison with the name provided.
/// Only the range between the sum of the best segments and the sum of the worst
/// segments is supported. Every other goal time is capped within that range.
Populates the segments with a goal comparison. The segment history is used
to generate comparison times such that they end up with the goal time
specified. The values are stored in the comparison with the name provided.
Only the range between the sum of the best segments and the sum of the worst
segments is supported. Every other goal time is capped within that range.
Populates the segments with a goal comparison . The segment history is used to generate comparison times such that they end up with the goal time specified . The values are stored in the comparison with the name provided . Only the range between the sum of the best segments and the sum of the worst segments is supported . Every other goal time is capped within that range .
pub fn generate(segments: &mut [Segment], goal_time: Time, comparison: &str) {
    let mut skill_curve = SkillCurve::new();
    if let Some(real_time) = goal_time.real_time {
        generate_for_timing_method_with_buf(
            segments,
            TimingMethod::RealTime,
            Some(real_time),
            comparison,
            &mut skill_curve,
        );
    } else {
        for segment in &mut *segments {
            segment.comparison_mut(comparison).real_time = None;
        }
    }
    if let Some(game_time) = goal_time.game_time {
        generate_for_timing_method_with_buf(
            segments,
            TimingMethod::GameTime,
            Some(game_time),
            comparison,
            &mut skill_curve,
        );
    } else {
        for segment in &mut *segments {
            segment.comparison_mut(comparison).game_time = None;
        }
    }
}
pub fn generate ( segments : & mut [ Segment ] , goal_time : Time , comparison : & str ) { let mut skill_curve = SkillCurve :: new ( ) ; if let Some ( real_time ) = goal_time . real_time { generate_for_timing_method_with_buf ( segments , TimingMethod :: RealTime , Some ( real_time ) , comparison , & mut skill_curve , ) ; } else { for segment in & mut * segments { segment . comparison_mut ( comparison ) . real_time = None ; } } if let Some ( game_time ) = goal_time . game_time { generate_for_timing_method_with_buf ( segments , TimingMethod :: GameTime , Some ( game_time ) , comparison , & mut skill_curve , ) ; } else { for segment in & mut * segments { segment . comparison_mut ( comparison ) . game_time = None ; } } }
Populates the segments with a goal comparison.
Populates the segments with a goal comparison .
segments
&mut [Segment]
goal_time
Time
comparison
&str
segments
&mut [Segment]
goal_time
Time
comparison
&str