value_index_uint32

Function value_index_uint32 

Source
pub unsafe extern "C" fn value_index_uint32(
    value: u32,
    values: *const u32,
    values_count: usize,
) -> usize
Expand description

Get the index of a uint32_t 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.

§Arguments

  • value - value to be searched.
  • values - pointer to the array to perform the search in.
  • values_count - array size.

§Returns

value’s index.