Add constructors to Point

This commit is contained in:
Pharap 2018-07-10 16:25:33 +01:00 committed by GitHub
parent 2f851f8784
commit 2427e7c86b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -122,6 +122,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 of the point */
Point(int16_t x, int16_t y); /**< The fully initialising constructor of the point */
}; };
//================================== //==================================