Function flipperzero_sys::value_index_float
source · pub unsafe extern "C" fn value_index_float(
value: f32,
values: *const f32,
values_count: u8
) -> u8Expand description
Get the index of a float array element which is closest to the given value. Returned index corresponds to the first element found. If no suitable elements were found, the function returns 0.
Returns:
- value’s index.
Arguments
value- value to be searched.values- pointer to the array to perform the search in.values_count- array size.