summaryrefslogtreecommitdiff
path: root/boost/geometry/strategies/geographic/intersection.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/strategies/geographic/intersection.hpp')
-rw-r--r--boost/geometry/strategies/geographic/intersection.hpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/boost/geometry/strategies/geographic/intersection.hpp b/boost/geometry/strategies/geographic/intersection.hpp
index b017097f3e..76c83bb534 100644
--- a/boost/geometry/strategies/geographic/intersection.hpp
+++ b/boost/geometry/strategies/geographic/intersection.hpp
@@ -2,7 +2,7 @@
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
-// Copyright (c) 2016-2017, Oracle and/or its affiliates.
+// Copyright (c) 2016-2018, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -425,7 +425,7 @@ private:
if (res_a1_a2.distance <= res_b1_b2.distance)
{
calculate_collinear_data(a1, a2, b1, b2, res_a1_a2, res_a1_b1, res_a1_b2, dist_a1_a2, dist_a1_b1);
- calculate_collinear_data(a1, a2, b1, b2, res_a1_a2, res_a1_b2, res_a1_b1, dist_a1_a2, dist_a1_b2);
+ calculate_collinear_data(a1, a2, b2, b1, res_a1_a2, res_a1_b2, res_a1_b1, dist_a1_a2, dist_a1_b2);
dist_b1_b2 = dist_a1_b2 - dist_a1_b1;
dist_b1_a1 = -dist_a1_b1;
dist_b1_a2 = dist_a1_a2 - dist_a1_b1;
@@ -433,7 +433,7 @@ private:
else
{
calculate_collinear_data(b1, b2, a1, a2, res_b1_b2, res_b1_a1, res_b1_a2, dist_b1_b2, dist_b1_a1);
- calculate_collinear_data(b1, b2, a1, a2, res_b1_b2, res_b1_a2, res_b1_a1, dist_b1_b2, dist_b1_a2);
+ calculate_collinear_data(b1, b2, a2, a1, res_b1_b2, res_b1_a2, res_b1_a1, dist_b1_b2, dist_b1_a2);
dist_a1_a2 = dist_b1_a2 - dist_b1_a1;
dist_a1_b1 = -dist_b1_a1;
dist_a1_b2 = dist_b1_b2 - dist_b1_a1;
@@ -611,48 +611,48 @@ private:
ResultInverse const& res_a1_b1, // in
ResultInverse const& res_a1_b2, // in
CalcT& dist_a1_a2, // out
- CalcT& dist_a1_bi, // out
+ CalcT& dist_a1_b1, // out
bool degen_neq_coords = false) // in
{
dist_a1_a2 = res_a1_a2.distance;
- dist_a1_bi = res_a1_b1.distance;
+ dist_a1_b1 = res_a1_b1.distance;
if (! same_direction(res_a1_b1.azimuth, res_a1_a2.azimuth))
{
- dist_a1_bi = -dist_a1_bi;
+ dist_a1_b1 = -dist_a1_b1;
}
- // if i1 is close to a1 and b1 or b2 is equal to a1
- if (is_endpoint_equal(dist_a1_bi, a1, b1, b2))
+ // if b1 is close a1
+ if (is_endpoint_equal(dist_a1_b1, a1, b1))
{
- dist_a1_bi = 0;
+ dist_a1_b1 = 0;
return true;
}
- // or i1 is close to a2 and b1 or b2 is equal to a2
- else if (is_endpoint_equal(dist_a1_a2 - dist_a1_bi, a2, b1, b2))
+ // if b1 is close a2
+ else if (is_endpoint_equal(dist_a1_a2 - dist_a1_b1, a2, b1))
{
- dist_a1_bi = dist_a1_a2;
+ dist_a1_b1 = dist_a1_a2;
return true;
}
- // check the other endpoint of a very short segment near the pole
+ // check the other endpoint of degenerated segment near a pole
if (degen_neq_coords)
{
static CalcT const c0 = 0;
if (math::equals(res_a1_b2.distance, c0))
{
- dist_a1_bi = 0;
+ dist_a1_b1 = 0;
return true;
}
else if (math::equals(dist_a1_a2 - res_a1_b2.distance, c0))
{
- dist_a1_bi = dist_a1_a2;
+ dist_a1_b1 = dist_a1_a2;
return true;
}
}
// or i1 is on b
- return segment_ratio<CalcT>(dist_a1_bi, dist_a1_a2).on_segment();
+ return segment_ratio<CalcT>(dist_a1_b1, dist_a1_a2).on_segment();
}
template <typename Point1, typename Point2, typename CalcT, typename ResultInverse, typename Spheroid_>
@@ -876,11 +876,11 @@ private:
template <typename CalcT, typename P1, typename P2>
static inline bool is_endpoint_equal(CalcT const& dist,
- P1 const& ai, P2 const& b1, P2 const& b2)
+ P1 const& ai, P2 const& b1)
{
static CalcT const c0 = 0;
using geometry::detail::equals::equals_point_point;
- return is_near(dist) && (equals_point_point(ai, b1) || equals_point_point(ai, b2) || math::equals(dist, c0));
+ return is_near(dist) && (math::equals(dist, c0) || equals_point_point(ai, b1));
}
template <typename CalcT>