Zephyr API 3.6.99
|
Provide linear interpolation functions. More...
Go to the source code of this file.
Functions | |
static int32_t | linear_interpolate (const int32_t *x_axis, const int32_t *y_axis, uint8_t len, int32_t x) |
Perform a linear interpolation across an arbitrary curve. | |
Provide linear interpolation functions.
|
inlinestatic |
Perform a linear interpolation across an arbitrary curve.
x_axis | Ascending list of X co-ordinates for y_axis data points |
y_axis | Y co-ordinates for each X data point |
len | Length of the x_axis and y_axis arrays |
x | X co-ordinate to lookup |
y_axis[0] | if x < x_axis[0] |
y_axis[len | - 1] if x > x_axis[len - 1] |
int32_t | Linear interpolation between the two nearest y_axis values. |