From fc9767abb14348c2236b487f0bc6d18de65a38fd Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Wed, 29 Sep 2021 09:36:34 +0545 Subject: Use functions defined in the their classes. --- modules/navigation/nav_map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/navigation') 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; } -- cgit v1.2.3