pub fn update(&mut self, dt: f64) -> [f64; 2] {
        use interpolation::Ease;
        use vecmath::vec2_scale as scale;

        if self.remaining > 0.0 {self.remaining -= dt};
        if self.remaining > 0.0 {
            let ease = ((self.repeat_delay - self.remaining) / self.repeat_delay)
                .calc(self.force_function);
            scale(self.impulse, ease / self.repeat_delay)
        } else {
            [0.0; 2]
        }
    }
/// Updates the flapping actuator, returning the force during this interval.
Updates the flapping actuator, returning the force during this interval.
Updates the flapping actuator returning the force during this interval .
pub fn update(&mut self, dt: f64) -> [f64; 2] {
        use interpolation::Ease;
        use vecmath::vec2_scale as scale;
        if self.remaining > 0.0 {self.remaining -= dt};
        if self.remaining > 0.0 {
            let ease = ((self.repeat_delay - self.remaining) / self.repeat_delay)
                .calc(self.force_function);
            scale(self.impulse, ease / self.repeat_delay)
        } else {
            [0.0; 2]
        }
    }
pub fn update ( & mut self , dt : f64 ) -> [ f64 ; 2 ] { use interpolation :: Ease ; use vecmath :: vec2_scale as scale ; if self . remaining > 0.0 { self . remaining -= dt } ; if self . remaining > 0.0 { let ease = ( ( self . repeat_delay - self . remaining ) / self . repeat_delay ) . calc ( self . force_function ) ; scale ( self . impulse , ease / self . repeat_delay ) } else { [ 0.0 ; 2 ] } }
Updates the flapping actuator, returning the force during this interval.
Updates the flapping actuator returning the force during this interval .
&mut self
dt
f64
&mut self
dt
f64