Something like this, but probably with more of that safety stuff:
// Somewhere in "modules/juce_core/maths/juce_MathsFunctions.h":
/** */
template<typename Type>
constexpr Type lerp (Type a, Type b, Type t) { return a + (t * (b - a)); }
