From 3f14886830d76368f3e3474b4972a0b2b280daca Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 23 Nov 2020 10:49:47 +1100 Subject: [PATCH] - binaryangle.h: Return `BAngToBAM()` as `int64_t` to handle signed values without overflowing on unsigned values. --- source/core/binaryangle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/binaryangle.h b/source/core/binaryangle.h index c557c13fd..ffd3ec2f0 100644 --- a/source/core/binaryangle.h +++ b/source/core/binaryangle.h @@ -100,7 +100,7 @@ inline double bcosf(const double ang, const int8_t shift = 0) // //--------------------------------------------------------------------------- -inline constexpr uint32_t BAngToBAM(int ang) +inline constexpr int64_t BAngToBAM(int ang) { return ang << BAMBITS; }