summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorzmiao <miao.zhao@mapbox.com>2020-03-18 12:05:22 +0200
committerzmiao <miao.zhao@mapbox.com>2020-03-19 14:40:49 +0200
commitb45cae286e2aab9a00120d5f2fa252dc95df5ef5 (patch)
tree04a5c1958a0938fea84087add0d1a9a236da9cf8 /src/mbgl/util
parentc3a1caf612905fda8e3761531a890b6f9c571f7f (diff)
downloadqtlocation-mapboxgl-b45cae286e2aab9a00120d5f2fa252dc95df5ef5.tar.gz
Refactor within function
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/geometry_within.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mbgl/util/geometry_within.cpp b/src/mbgl/util/geometry_within.cpp
index 3c5e26c940..28a53c8ebc 100644
--- a/src/mbgl/util/geometry_within.cpp
+++ b/src/mbgl/util/geometry_within.cpp
@@ -5,13 +5,11 @@
namespace mbgl {
namespace {
-
bool rayIntersect(const Point<int64_t>& p, const Point<int64_t>& p1, const Point<int64_t>& p2) {
return ((p1.y > p.y) != (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x);
}
// check if point p in on line segment with end points p1 and p2
-
bool onBoundary(const Point<int64_t>& p, const Point<int64_t>& p1, const Point<int64_t>& p2) {
// requirements of point p on line segment:
// 1. colinear: cross product of vector p->p1(x1, y1) and vector p->p2(x2, y2) equals to 0
@@ -24,7 +22,6 @@ bool onBoundary(const Point<int64_t>& p, const Point<int64_t>& p1, const Point<i
}
// a, b are end points for line segment1, c and d are end points for line segment2
-
bool lineIntersectLine(const Point<int64_t>& a,
const Point<int64_t>& b,
const Point<int64_t>& c,