diff --git a/include/boost/geometry/algorithms/detail/buffer/parallel_continue.hpp b/include/boost/geometry/algorithms/detail/buffer/parallel_continue.hpp index be9d2cfad..119d64de7 100644 --- a/include/boost/geometry/algorithms/detail/buffer/parallel_continue.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/parallel_continue.hpp @@ -9,8 +9,6 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_PARALLEL_CONTINUE_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_PARALLEL_CONTINUE_HPP -#include - namespace boost { namespace geometry { @@ -22,8 +20,8 @@ namespace detail { namespace buffer template inline bool parallel_continue(T dx1, T dy1, T dx2, T dy2) { - return math::sign(dx1) == math::sign(dx2) - && math::sign(dy1) == math::sign(dy2); + T const dot = dx1 * dx2 + dy1 * dy2; + return dot > 0; } }} // namespace detail::buffer