fn velocity(&self, sample_count: usize, sample_duration: Duration) -> Vec<V> {
        let sample_delta = sample_duration.as_secs_f64() / sample_count.to_f64();
        self.path(sample_count + 1, sample_duration)
            .windows(2)
            .map(|window| {
                window[1].zip_map(window[0], |a, b| (a - b) / V::cast_component(sample_delta))
            })
            .collect()
    }
// Sampling error can occur arround tight curves, showing reduced velocity
Sampling error can occur arround tight curves, showing reduced velocity
Sampling error can occur arround tight curves showing reduced velocity
fn velocity(&self, sample_count: usize, sample_duration: Duration) -> Vec<V> {
        let sample_delta = sample_duration.as_secs_f64() / sample_count.to_f64();
        self.path(sample_count + 1, sample_duration)
            .windows(2)
            .map(|window| {
                window[1].zip_map(window[0], |a, b| (a - b) / V::cast_component(sample_delta))
            })
            .collect()
    }
fn velocity ( & self , sample_count : usize , sample_duration : Duration ) -> Vec < V > { let sample_delta = sample_duration . as_secs_f64 ( ) / sample_count . to_f64 ( ) ; self . path ( sample_count + 1 , sample_duration ) . windows ( 2 ) . map ( | window | { window [ 1 ] . zip_map ( window [ 0 ] , | a , b | ( a - b ) / V :: cast_component ( sample_delta ) ) } ) . collect ( ) }
Sampling error can occur arround tight curves, showing reduced velocity
Sampling error can occur arround tight curves showing reduced velocity
&self
sample_count
usize
sample_duration
Duration
&self
sample_count
usize
sample_duration
Duration