Browse Source

Fix to Rectangle::contains. (thanks mozeal)

Darryl Gough 13 years ago
parent
commit
aecb58b194
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gameplay/src/Rectangle.cpp

+ 1 - 1
gameplay/src/Rectangle.cpp

@@ -80,7 +80,7 @@ float Rectangle::bottom() const
 
 bool Rectangle::contains(float x, float y) const
 {
-    return (x >= x && x <= (x + width) && y >= y && y <= (y + height));
+    return (x >= this->x && x <= (this->x + width) && y >= this->y && y <= (this->y + height));
 }
 
 bool Rectangle::contains(float x, float y, float width, float height) const