projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ff948b
)
Added Rectf::grown(float border) method
author
Ingo Ruhnke
<grumbel@gmail.com>
Mon, 25 Aug 2014 03:37:53 +0000
(
05:37
+0200)
committer
Ingo Ruhnke
<grumbel@gmail.com>
Mon, 25 Aug 2014 07:54:13 +0000
(09:54 +0200)
src/math/rectf.hpp
patch
|
blob
|
history
diff --git
a/src/math/rectf.hpp
b/src/math/rectf.hpp
index
80bc478
..
cdff094
100644
(file)
--- a/
src/math/rectf.hpp
+++ b/
src/math/rectf.hpp
@@
-129,6
+129,12
@@
public:
return ((v1 - v2).norm ());
}
+ Rectf grown(float border) const
+ {
+ return Rectf(p1.x - border, p1.y - border,
+ p2.x + border, p2.y + border);
+ }
+
// leave these two public to save the headaches of set/get functions for such
// simple things :)