Add constructors to Point

This commit is contained in:
Pharap 2018-07-10 16:25:33 +01:00 committed by Scott Allen
parent bc63e39931
commit 1f86208163
2 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,15 @@ Rect::Rect(int16_t x, int16_t y, uint8_t width, uint8_t height)
{ {
} }
//=================================
//========== class Point ==========
//=================================
Point::Point(int16_t x, int16_t y)
: x(x), y(y)
{
}
//======================================== //========================================
//========== class Arduboy2Base ========== //========== class Arduboy2Base ==========
//======================================== //========================================

View File

@ -121,6 +121,10 @@ struct Point
{ {
int16_t x; /**< The X coordinate of the point */ int16_t x; /**< The X coordinate of the point */
int16_t y; /**< The Y coordinate of the point */ int16_t y; /**< The Y coordinate of the point */
Point() = default; /**< The default constructor */
Point(int16_t x, int16_t y); /**< The fully initialising constructor */
}; };
//================================== //==================================