mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-02 13:51:52 +00:00
- Bring in interpolatedvalue()
for TRotator<>
objects from Raze.
* Would have come in eventually but I may need it.
This commit is contained in:
parent
8b6a714d41
commit
c99b18dc45
1 changed files with 10 additions and 0 deletions
|
@ -1547,6 +1547,16 @@ inline TAngle<T> interpolatedvalue(const TAngle<T> &oang, const TAngle<T> &ang,
|
|||
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>
|
||||
inline T interpolatedvalue(const T& oval, const T& val, const double interpfrac)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue