Function minterpolate::get_input_index[][src]

pub fn get_input_index(input: f32, inputs: &[f32]) -> Option<usize>

Calculate the keyframe index in the input collection

Parameters

  • input: the input value to the function
  • inputs: list of discrete input values for each keyframe

Returns

The index into the inputs, corresponding to the given input.