From 9fe89984765c9ca31818f38f8e78d9f8fe803f91 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 24 Aug 2017 17:11:48 +1000 Subject: [PATCH] geom/aabb: rename overlaps as inclusive for consistency --- geom/aabb.cpp | 2 +- geom/aabb.hpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/geom/aabb.cpp b/geom/aabb.cpp index 029ea30e..4b1acb05 100644 --- a/geom/aabb.cpp +++ b/geom/aabb.cpp @@ -58,7 +58,7 @@ aabb::magnitude (void) const //----------------------------------------------------------------------------- template bool -aabb::overlaps (point p) const +aabb::inclusive (point p) const { for (size_t i = 0; i < S; ++i) if (p0[i] > p[i] || p1[i] < p[i]) diff --git a/geom/aabb.hpp b/geom/aabb.hpp index ab943799..461ac8fb 100644 --- a/geom/aabb.hpp +++ b/geom/aabb.hpp @@ -33,7 +33,8 @@ namespace util::geom { T diameter (void) const; extent magnitude (void) const; - bool overlaps (point) const; + /// tests whether a point lies within the region, inclusive of borders + bool inclusive (point) const; point closest (point) const;