- binangle class: Tidy up missed C++20 warning fixed about enum used in floating-point arithmetic.

This commit is contained in:
Mitch Richters 2021-11-06 09:38:51 +11:00
parent 0eb4ff4ad2
commit 91f6b2954c

View file

@ -207,7 +207,7 @@ public:
inline constexpr binangle bamang(uint32_t v) { return binangle(v); } inline constexpr binangle bamang(uint32_t v) { return binangle(v); }
inline constexpr binangle q16ang(uint32_t v) { return binangle(v << 5); } inline constexpr binangle q16ang(uint32_t v) { return binangle(v << 5); }
inline constexpr binangle buildang(uint32_t v) { return binangle(v << BAMBITS); } 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 radang(double v) { return binangle(xs_CRoundToUInt(v * (0x80000000u / pi::pi()))); }
inline binangle degang(double v) { return binangle(FloatToAngle(v)); } inline binangle degang(double v) { return binangle(FloatToAngle(v)); }