mc: add SYS_VEHICLE_RESP param to configure vehicle responsiveness

This commit is contained in:
Beat Küng
2021-02-03 13:25:37 +01:00
committed by Lorenz Meier
parent 2a0a82fd90
commit 14bf9cf753
4 changed files with 126 additions and 1 deletions
+12
View File
@@ -198,4 +198,16 @@ const T sqrt_linear(const T &value)
}
}
/*
* Linear interpolation between 2 points a, and b.
* s=0 return a
* s=1 returns b
* Any value for s is valid.
*/
template<typename T>
const T lerp(const T &a, const T &b, const T &s)
{
return (static_cast<T>(1) - s) * a + s * b;
}
} /* namespace math */