- Bring in interpolatedvalue() for TRotator<> objects from Raze.

* Would have come in eventually but I may need it.
This commit is contained in:
Mitchell Richters 2022-12-01 19:58:58 +11:00 committed by Christoph Oelckers
parent 8b6a714d41
commit c99b18dc45

View file

@ -1547,6 +1547,16 @@ inline TAngle<T> interpolatedvalue(const TAngle<T> &oang, const TAngle<T> &ang,
return oang + (deltaangle(oang, ang) * interpfrac); return oang + (deltaangle(oang, ang) * interpfrac);
} }
template<class T>
inline TRotator<T> interpolatedvalue(const TRotator<T> &oang, const TRotator<T> &ang, const double interpfrac)
{
return TRotator<T>(
interpolatedvalue(oang.Pitch, ang.Pitch, interpfrac),
interpolatedvalue(oang.Yaw, ang.Yaw, interpfrac),
interpolatedvalue(oang.Roll, ang.Roll, interpfrac)
);
}
template <class T> template <class T>
inline T interpolatedvalue(const T& oval, const T& val, const double interpfrac) inline T interpolatedvalue(const T& oval, const T& val, const double interpfrac)
{ {