From 0683e3c9908f404419306cf0fb8be66693ba0d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Sun, 21 Aug 2022 18:55:51 -0700 Subject: [PATCH] Cleanup. --- src/math.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/math.cpp b/src/math.cpp index 6ebf754..8975d5b 100644 --- a/src/math.cpp +++ b/src/math.cpp @@ -6,6 +6,8 @@ #include #include +#include + namespace bx { const float kInfinity = bitsToFloat(UINT32_C(0x7f800000) ); @@ -112,7 +114,7 @@ namespace bx if (maxaxy == 0.0f) { - return 0.0f*sign(_y); + return _y < 0.0f ? -0.0f : 0.0f; } const float mxy = minaxy / maxaxy; @@ -125,7 +127,7 @@ namespace bx const float tmp5 = tmp4 * mxy; const float tmp6 = ay > ax ? kPiHalf - tmp5 : tmp5; const float tmp7 = _x < 0.0f ? kPi - tmp6 : tmp6; - const float result = (_y < 0.0f ? -1.0f : 1.0f)*tmp7; + const float result = _y < 0.0f ? -tmp7 : tmp7; return result; }