projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
first version of floating image
[supertux.git]
/
src
/
math
/
rect.hpp
diff --git
a/src/math/rect.hpp
b/src/math/rect.hpp
index
03728ea
..
f7179a9
100644
(file)
--- a/
src/math/rect.hpp
+++ b/
src/math/rect.hpp
@@
-26,6
+26,18
@@
public:
assert(p1.x <= p2.x && p1.y <= p2.y);
}
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; }
float get_width() const
{ return p2.x - p1.x; }