Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-12 17:27:00 +0000
committerStijn Buys <ingar@osirion.org>2008-10-12 17:27:00 +0000
commit574bf11742c40203a4433c0b69264014b10b5a96 (patch)
tree5fdaa40d22c38e5d8cce47d43a1a892008322598 /src/math
parentb417df720584c101f3799874a0c836a543a8d0a8 (diff)
container widget
Diffstat (limited to 'src/math')
-rw-r--r--src/math/vector2f.h8
1 files changed, 8 insertions, 0 deletions
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;