Home
last modified time | relevance | path

Searched refs:idx_low (Results 1 – 1 of 1) sorted by relevance

/Zephyr-latest/include/zephyr/math/
Dinterpolation.h42 uint8_t idx_low = 0; in linear_interpolate() local
52 while (x >= x_axis[idx_low + 1]) { in linear_interpolate()
53 idx_low++; in linear_interpolate()
57 x_shifted = x - x_axis[idx_low]; in linear_interpolate()
59 return y_axis[idx_low]; in linear_interpolate()
63 rise = y_axis[idx_low + 1] - y_axis[idx_low]; in linear_interpolate()
64 run = x_axis[idx_low + 1] - x_axis[idx_low]; in linear_interpolate()
68 return roundf(y_axis[idx_low] + (slope * x_shifted)); in linear_interpolate()