diff --git a/source/core/rendering/scene/hw_clipper.cpp b/source/core/rendering/scene/hw_clipper.cpp index 81b3c08da..124bea91c 100644 --- a/source/core/rendering/scene/hw_clipper.cpp +++ b/source/core/rendering/scene/hw_clipper.cpp @@ -358,29 +358,6 @@ void Clipper::DoRemoveClipRange(angle_t start, angle_t end) // //----------------------------------------------------------------------------- -binangle Clipper::PointToAngle(const vec2_t& pos) -{ - vec2_t vec = pos - viewpoint; -#if 0 - - if (vec.x == 0 && vec.y == 0) - { - return 0; - } - else - { - double result = vec.y / double(abs(vec.x) + fabs(vec.y)); - if (vec.x < 0) - { - result = 2. - result; - } - return bamang(xs_Fix<30>::ToFix(result)); - } -#else - return bvectangbam(vec.x, vec.y); -#endif -} - void Clipper::DumpClipper() { for (auto node = cliphead; node; node = node->next) diff --git a/source/core/rendering/scene/hw_clipper.h b/source/core/rendering/scene/hw_clipper.h index e19a01136..5c1280d5b 100644 --- a/source/core/rendering/scene/hw_clipper.h +++ b/source/core/rendering/scene/hw_clipper.h @@ -144,7 +144,29 @@ public: void DumpClipper(); - binangle PointToAngle(const vec2_t& point); + binangle PointToAngle(const vec2_t& pos) + { + vec2_t vec = pos - viewpoint; +#if 0 + + if (vec.x == 0 && vec.y == 0) + { + return bamang(0); + } + else + { + double result = vec.y / double(abs(vec.x) + fabs(vec.y)); + if (vec.x < 0) + { + result = 2. - result; + } + return bamang(xs_Fix<30>::ToFix(result)); + } +#else + return bvectangbam(vec.x, vec.y); +#endif + } + };