- Fix broken wrap-around in the double version of BobVal().

* My first time actually witnessing this, but was only a problem with GCC...
This commit is contained in:
Mitchell Richters 2022-10-22 13:33:14 +11:00
parent 70b6aa848f
commit 4e8331b16b

View file

@ -601,7 +601,7 @@ inline double BobVal(int val)
inline double BobVal(double val)
{
return g_sinbam((unsigned)(val * (1 << 21)));
return g_sinbam(xs_CRoundToUInt(val * (1 << 21)));
}
#include "updatesector.h"