X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmath%2Frect.hpp;h=f7179a9e703397ffb84f874c60b4e6c974eba43c;hb=6a5c52fa2a14acd773c628dcd9c04221fe6e960f;hp=03728ea40a81bfddea55a39e9af9bd6da050e4d1;hpb=f9b655aacd208ce9959b271bd0d78de3e367d3b9;p=supertux.git diff --git a/src/math/rect.hpp b/src/math/rect.hpp index 03728ea40..f7179a9e7 100644 --- a/src/math/rect.hpp +++ b/src/math/rect.hpp @@ -26,6 +26,18 @@ public: assert(p1.x <= p2.x && p1.y <= p2.y); } + float get_left() const + { return p1.x; } + + float get_right() const + { return p2.x; } + + float get_top() const + { return p1.y; } + + float get_bottom() const + { return p2.y; } + float get_width() const { return p2.x - p1.x; }