ExitCondition
vectorlib::ExitCondition — fields, methods, parameters and return types.
pub struct ExitConditionExits when the input has stayed within range for time milliseconds.
Methods
Prop
Type
new
pub const fn new(range: f32, time: i32) -> SelfCreate a new exit condition.
range— the exit condition will be met when the input is within this rangetime— the exit condition will be met if the input stays in range for this many milliseconds
Parameters
Prop
Type
Returns
Selfget_exit
pub fn get_exit(&self) -> boolWhether the exit condition has been met.
Returns
boolupdate
pub fn update(&mut self, input: f32) -> boolUpdate the exit condition and return whether it has been met.
Parameters
Prop
Type
Returns
boolreset
pub fn reset(&mut self)Reset the exit condition timer.
Returns
()