9#ifndef MAXOS_COMMON_RECTANGLE_H
10#define MAXOS_COMMON_RECTANGLE_H
14namespace MaxOS::common {
94 if(other.
left >= left + width)
102 if(other.
top >= top + height)
118 if(!intersects(other))
Stores the left, top, width and height of a rectangle.
Type height
The height of the rectangle.
Type top
The top coordinate of the rectangle.
bool contains(Type x, Type y)
bool intersects(const Rectangle< Type > &)
Rectangle< Type > intersection(const Rectangle< Type > &)
Type left
The left coordinate of the rectangle.
Vector< Rectangle< Type > > subtract(const Rectangle< Type > &)
Rectangle()
_______________________________________________TEMPLATES_____________________________________________...
bool contains(const Rectangle< Type > &)
Type width
The width of the rectangle.
Rectangle(Type left, Type top, Type width, Type height)
Creates a new rectangle, if width or height are negative, the left/top will be adjusted and the width...
Dynamically stores an array of elements.
Defines a Vector class for dynamically storing an array of elements.