[buffer][fix] Fixed detection of difference spike/continue

This commit is contained in:
Barend Gehrels
2014-07-23 13:32:24 +02:00
parent 04eeee1b56
commit f09387fabb

View File

@@ -9,8 +9,6 @@
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_PARALLEL_CONTINUE_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_BUFFER_PARALLEL_CONTINUE_HPP
#include <boost/geometry/util/math.hpp>
namespace boost { namespace geometry
{
@@ -22,8 +20,8 @@ namespace detail { namespace buffer
template <typename T>
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