mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-03 09:12:13 +00:00
[buffer][fix] Fixed detection of difference spike/continue
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user