#ifndef INC_UTIL_H #define INC_UTIL_H #include /** * @brief Perform linear interpolation. * * @param n_points Size of source_x and source_y * @param source_x x values for the interpolation source (sorted ascending) * @param source_y y values corresponding to source_x * @param target_x x value that a y value should be interpolated for */ float interp(uint32_t n_points, const float* source_x, const float* source_y, float target_x); #endif // INC_UTIL_H