From 656705bcd7cf155132c16502b177125ac7c913fb Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 11 Apr 2021 17:02:44 +1000 Subject: [PATCH] - binangle: Add `signedrad()` and `signeddeg()` methods for consistency with the unsigned methods. * Left out from f254eeb4656fe4b00050e70bda08a4c81c8de496. --- source/core/binaryangle.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/core/binaryangle.h b/source/core/binaryangle.h index 73ec90911..dbb0fce8f 100644 --- a/source/core/binaryangle.h +++ b/source/core/binaryangle.h @@ -143,6 +143,8 @@ public: constexpr double signedbuildf() const { return tosigned() * (1. / BAMUNIT); } constexpr fixed_t signedq16() const { return tosigned() >> 5; } constexpr int32_t signedbam() const { return tosigned(); } + constexpr double signedrad() const { return tosigned() * (pi::pi() / 0x80000000u); } + constexpr double signeddeg() const { return AngleToFloat(tosigned()); } double fsin() const { return g_sin(asrad()); } double fcos() const { return g_cos(asrad()); }