Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
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;