28float interpolateMsg(
const char *msg,
float x1,
float y1,
float x2,
float y2,
float x) {
29 if (std::isnan(x1) || std::isnan(x2) || std::isnan(y1) || std::isnan(y2)) {
49 float a = INTERPOLATION_A(x1, y1, x2, y2);
54 float b = y1 - a * x1;
60 criticalError(
"interpolateClamped %f has to be smaller than %f", x1, x2);
77 float a = INTERPOLATION_A(x1, y1, x2, y2);
78 float b = y1 - a * x1;
bool warning(ObdCode code, const char *fmt,...)
float interpolateMsg(const char *msg, float x1, float y1, float x2, float y2, float x)
Linear interpolation by two points.
float interpolateClampedWithValidation(float x1, float y1, float x2, float y2, float x)
float interpolateClamped(float x1, float y1, float x2, float y2, float x)
@ CUSTOM_ERR_INTERPOLATE_3
@ CUSTOM_ERR_INTERPOLATE_4
@ CUSTOM_ERR_INTERPOLATE_2
@ CUSTOM_ERR_INTERPOLATE_1