Remove bogus assert
[supertux.git] / src / math / rectf.hpp
index a0001f1..cdff094 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <assert.h>
 
+#include "math/sizef.hpp"
 #include "math/vector.hpp"
 #include "object/anchor_point.hpp"
 
@@ -89,9 +90,9 @@ public:
     set_width(width);
     set_height(height);
   }
-  Vector get_size()
+  Sizef get_size() const
   {
-    return Vector(get_width(), get_height());
+    return Sizef(get_width(), get_height());
   }
 
   void move(const Vector& v)
@@ -128,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 :)