summaryrefslogtreecommitdiff
path: root/modules/navigation
diff options
context:
space:
mode:
authorAnilforextra <anilforextra@gmail.com>2021-09-29 09:36:34 +0545
committerAnilforextra <anilforextra@gmail.com>2021-09-29 09:36:34 +0545
commitfc9767abb14348c2236b487f0bc6d18de65a38fd (patch)
treeef480b9a349b88a51b75296eae844c27a2504469 /modules/navigation
parent5aa099aaed359df6ff79fe31616b5601db2a42c5 (diff)
Use functions defined in the their classes.
Diffstat (limited to 'modules/navigation')
-rw-r--r--modules/navigation/nav_map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp
index 3150ca0bc8..962bf79150 100644
--- a/modules/navigation/nav_map.cpp
+++ b/modules/navigation/nav_map.cpp
@@ -664,7 +664,7 @@ void NavMap::sync() {
} else {
other1 = other_edge_p1.lerp(other_edge_p2, (1.0 - projected_p1_ratio) / (projected_p2_ratio - projected_p1_ratio));
}
- if ((self1 - other1).length() > edge_connection_margin) {
+ if (other1.distance_to(self1) > edge_connection_margin) {
continue;
}
@@ -675,7 +675,7 @@ void NavMap::sync() {
} else {
other2 = other_edge_p1.lerp(other_edge_p2, (0.0 - projected_p1_ratio) / (projected_p2_ratio - projected_p1_ratio));
}
- if ((self2 - other2).length() > edge_connection_margin) {
+ if (other2.distance_to(self2) > edge_connection_margin) {
continue;
}