mc: add SYS_VEHICLE_RESP param to configure vehicle responsiveness

This commit is contained in:
Beat Küng authored and Lorenz Meier committed 2021-02-24 17:27:31 +01:00
1 parent 2a0a82fd90
commit 14bf9cf753
4 files changed
+126 -1

No files matched your search

+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 */