Stores four coordinates representing a rectangle. More...
#include <common.hpp>
Public Member Functions | |
Rectangle (unit x1_, unit y1_, unit x2_, unit y2_) | |
Create a rectangle using the specified set of four coordinates. | |
unit | Width () const |
Returns the width of the rectangle. | |
unit | Height () const |
Returns the height of the rectangle. | |
unit | Size () const |
Returns the size of the rectangle (width * height). | |
Public Attributes | |
unit | x1 |
X coordinate of top-left corner of rectangle. | |
unit | y1 |
Y coordinate of top-left corner of rectangle. | |
unit | x2 |
X coordinate of bottom-right corner of rectangle. | |
unit | y2 |
Y coordinate of bottom-right corner of rectangle. |
Stores four coordinates representing a rectangle.
Create a rectangle using the specified set of four coordinates.
unit a5::Rectangle::Width | ( | ) | const |
Returns the width of the rectangle.
unit a5::Rectangle::Height | ( | ) | const |
Returns the height of the rectangle.
unit a5::Rectangle::Size | ( | ) | const |
Returns the size of the rectangle (width * height).
X coordinate of top-left corner of rectangle.
Y coordinate of top-left corner of rectangle.
X coordinate of bottom-right corner of rectangle.
Y coordinate of bottom-right corner of rectangle.