From 91f6b2954c01fd4e9d0404b6ac4da16bb6032eb9 Mon Sep 17 00:00:00 2001 From: Mitch Richters Date: Sat, 6 Nov 2021 09:38:51 +1100 Subject: [PATCH] - `binangle` class: Tidy up missed C++20 warning fixed about enum used in floating-point arithmetic. --- 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 c6a0322fc..fcae89074 100644 --- a/source/core/binaryangle.h +++ b/source/core/binaryangle.h @@ -207,7 +207,7 @@ public: inline constexpr binangle bamang(uint32_t v) { return binangle(v); } inline constexpr binangle q16ang(uint32_t v) { return binangle(v << 5); } inline constexpr binangle buildang(uint32_t v) { return binangle(v << BAMBITS); } -inline binangle buildfang(double v) { return binangle(xs_CRoundToUInt(v * BAMUNIT)); } +inline binangle buildfang(double v) { return binangle(xs_ToFixed(BAMBITS, v)); } inline binangle radang(double v) { return binangle(xs_CRoundToUInt(v * (0x80000000u / pi::pi()))); } inline binangle degang(double v) { return binangle(FloatToAngle(v)); }