- Fix constexpr issue with interpolatedanglef() since fmod() isn't available as constexpr.

This commit is contained in:
Mitchell Richters 2021-07-29 18:38:07 +10:00
parent 32215ba570
commit 019922dcf1

View file

@ -387,7 +387,7 @@ inline constexpr int32_t interpolatedangle(int32_t oang, int32_t ang, int const
return oang + MulScale(((ang + 1024 - oang) & 2047) - 1024, smoothratio, scale); return oang + MulScale(((ang + 1024 - oang) & 2047) - 1024, smoothratio, scale);
} }
inline constexpr double interpolatedanglef(double oang, double ang, double const smoothratio, int const scale = 16) inline double interpolatedanglef(double oang, double ang, double const smoothratio, int const scale = 16)
{ {
return oang + MulScaleF(fmod((ang + 1024. - oang), 2048.) - 1024., smoothratio, scale); return oang + MulScaleF(fmod((ang + 1024. - oang), 2048.) - 1024., smoothratio, scale);
} }