/// Find the timing point to inherit from
Find the timing point to inherit from
Find the timing point to inherit from
fn find_tp_inherit_from(time: f64, timing_points: &[OsuTimingPoint]) -> Option<&OsuTimingPoint> {
    if let Some(tp) = timing_points.first() {
        if time < tp.offset {
            Some(tp)
        } else {
            let mut tp_index = 0;
            for (i, timing_point) in timing_points.iter().enumerate() {
                if timing_point.offset > time {
                    break;
                } else {
                    tp_index = i;
                }
            }
            Some(&timing_points[tp_index])
        }
    } else {
        None
    }
}
fn find_tp_inherit_from ( time : f64 , timing_points : & [ OsuTimingPoint ] ) -> Option < & OsuTimingPoint > { if let Some ( tp ) = timing_points . first ( ) { if time < tp . offset { Some ( tp ) } else { let mut tp_index = 0 ; for ( i , timing_point ) in timing_points . iter ( ) . enumerate ( ) { if timing_point . offset > time { break ; } else { tp_index = i ; } } Some ( & timing_points [ tp_index ] ) } } else { None } }
Find the timing point to inherit from
Find the timing point to inherit from
time
f64
timing_points
&[OsuTimingPoint]