pub fn tick(&mut self) {
        if let Some(interpolation_state) = &self.interpolation_state {
            self.current_value += interpolation_state.tick_increment;

            // Reset internal state & don't let the value exceed the target.
            if self.current_value >= interpolation_state.target {
                self.current_value = interpolation_state.target;
                self.interpolation_state = None;
            }
        }
    }
/// Interpolates current value towards the target value
Interpolates current value towards the target value
Interpolates current value towards the target value
pub fn tick(&mut self) {
        if let Some(interpolation_state) = &self.interpolation_state {
            self.current_value += interpolation_state.tick_increment;
            // Reset internal state & don't let the value exceed the target.
            if self.current_value >= interpolation_state.target {
                self.current_value = interpolation_state.target;
                self.interpolation_state = None;
            }
        }
    }
pub fn tick ( & mut self ) { if let Some ( interpolation_state ) = & self . interpolation_state { self . current_value += interpolation_state . tick_increment ; // Reset internal state & don't let the value exceed the target. if self . current_value >= interpolation_state . target { self . current_value = interpolation_state . target ; self . interpolation_state = None ; } } }
Interpolates current value towards the target value
Interpolates current value towards the target value
&mut self
&mut self