diff options
Diffstat (limited to 'src/utils/rectangle.hpp')
-rw-r--r-- | src/utils/rectangle.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp index b1e67ba8..95f1a7b4 100644 --- a/src/utils/rectangle.hpp +++ b/src/utils/rectangle.hpp @@ -95,6 +95,13 @@ namespace usdx return Math::min(point1.get_y(), point2.get_y()); } + void set_top(T value) + { + T height = get_height(); + point1.set_y(value); + point2.set_y(value + height); + } + const T get_bottom(void) const { return Math::max(point1.get_y(), point2.get_y()); |