diff options
author | Gard Spreemann <gspreemann@gmail.com> | 2018-02-02 13:51:45 +0100 |
---|---|---|
committer | Gard Spreemann <gspreemann@gmail.com> | 2018-02-02 13:51:45 +0100 |
commit | 9899ae167f281d10b1684dfcd02c6838c5bf28df (patch) | |
tree | ceda62a40a9a8f731298832b1b4ab44ab0dd3a10 /include/gudhi/Neighbors_finder.h | |
parent | 866f6ce614e9c09c97fed12c8c0c2c9fb84fad3f (diff) |
GUDHI 2.1.0 as released by upstream in a tarball.upstream/2.1.0
Diffstat (limited to 'include/gudhi/Neighbors_finder.h')
-rw-r--r-- | include/gudhi/Neighbors_finder.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/gudhi/Neighbors_finder.h b/include/gudhi/Neighbors_finder.h index a6b9b021..87c7cee5 100644 --- a/include/gudhi/Neighbors_finder.h +++ b/include/gudhi/Neighbors_finder.h @@ -32,6 +32,7 @@ #include <unordered_set> #include <vector> +#include <algorithm> // for std::max namespace Gudhi { @@ -44,7 +45,7 @@ struct Square_query { typedef Internal_point Point_d; typedef double FT; bool contains(Point_d p) const { - return std::abs(p.x()-c.x()) <= size && std::abs(p.y()-c.y()) <= size; + return std::max(std::abs(p.x()-c.x()), std::abs(p.y()-c.y())) <= size; } bool inner_range_intersects(CGAL::Kd_tree_rectangle<FT, D> const&r) const { return |