From 574bf11742c40203a4433c0b69264014b10b5a96 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 12 Oct 2008 17:27:00 +0000 Subject: container widget --- src/math/vector2f.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/math') diff --git a/src/math/vector2f.h b/src/math/vector2f.h index 6029b3c..ee2d044 100644 --- a/src/math/vector2f.h +++ b/src/math/vector2f.h @@ -90,7 +90,15 @@ public: inline bool contains(float x, float y) const { return ((x >= 0) && (y >= 0) && (x <= coord[0]) && (y <= coord[1])); } + + inline float width() const { + return coord[0]; + } + inline float height() const { + return coord[1]; + } + /// x coordinate float &x; -- cgit v1.2.3