From c8296f0d7c9d8c8175afffc557b135ca0cefdf10 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 Apr 2022 22:31:12 +0200 Subject: [PATCH] - cast arguments for fastcos/sinbam Use xs_Float to ensure proper wraparound which is important here. --- src/common/thirdparty/math/cmath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/thirdparty/math/cmath.h b/src/common/thirdparty/math/cmath.h index 7059e5e57..26102e3f0 100644 --- a/src/common/thirdparty/math/cmath.h +++ b/src/common/thirdparty/math/cmath.h @@ -56,12 +56,12 @@ extern FFastTrig fasttrig; inline double fastcosbam(double v) { - return fasttrig.cos(v); + return fasttrig.cos(xs_CRoundToUInt(v)); } inline double fastsinbam(double v) { - return fasttrig.sin(v); + return fasttrig.sin(xs_CRoundToUInt(v)); } inline double fastcosdeg(double v)