From 6b8bdcc449210092fed874f10fe8af928ab89fc8 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 28 Dec 2022 02:07:10 -0500 Subject: [PATCH] - fix math error on ARM architectures --- source/common/utility/basics.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/common/utility/basics.h b/source/common/utility/basics.h index 4ebc2cc88..6655ede2c 100644 --- a/source/common/utility/basics.h +++ b/source/common/utility/basics.h @@ -3,6 +3,7 @@ #include #include #include +#include "xs_Float.h" #define MAXWIDTH 12000 #define MAXHEIGHT 5000 @@ -103,12 +104,12 @@ inline double RAD2DEG(double rad) inline angle_t RAD2BAM(float rad) { - return angle_t(rad * float(0x80000000u / M_PI)); + return angle_t(xs_RoundToUInt(rad * float(0x80000000u / M_PI))); } inline angle_t RAD2BAM(double rad) { - return angle_t(rad * (0x80000000u / M_PI)); + return angle_t(xs_RoundToUInt(rad * (0x80000000u / M_PI))); }