8#include <Dualie/System/Vector2.hpp>
34 Rect(T left, T top, T width, T height) {
39 this->height = height;
59 return (this->left < rect.left + rect.width && this->left + this->width > rect.left &&
60 this->top < rect.top + rect.height && this->top + this->height > rect.top);
69 return (point.x > this->left && point.x < this->left + this->width && point.y > this->top && point.y < this->top + this->height);
73 using FloatRect = Rect<float>;
A class that represents a bounding box.
Definition Rect.hpp:17
bool intersects(Rect< T > rect)
Returns whether a rect intersects the bounds of this rect.
Definition Rect.hpp:58
bool contains(dl::Vector2< T > point)
Returns whether a point intersects the bounds of this rect.
Definition Rect.hpp:68
Used to contain a set of two numbers.
Definition Vector2.hpp:16