diff --git a/region.cpp b/region.cpp index a2b20061..86778a63 100644 --- a/region.cpp +++ b/region.cpp @@ -109,6 +109,15 @@ util::region::base (void) const } +//----------------------------------------------------------------------------- +template +util::point<2,T> +util::region::far (void) const +{ + return { x + w, y + h }; +} + + //----------------------------------------------------------------------------- template util::point<2,T> diff --git a/region.hpp b/region.hpp index b89d6a79..73c9d7f9 100644 --- a/region.hpp +++ b/region.hpp @@ -54,6 +54,7 @@ namespace util { bool empty (void) const; point<2,T> base (void) const; + point<2,T> far (void) const; point<2,T> centre (void) const; point<2,T> closest (point<2,T>) const;