-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPoint.cpp
More file actions
29 lines (22 loc) · 781 Bytes
/
Point.cpp
File metadata and controls
29 lines (22 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ===========================================================================
// Point.cpp
// ===========================================================================
#include "Point.h"
namespace Rectangles {
// c'tor(s)
Point::Point() : Point(0, 0) {}
// Point::Point(double x, double y) : m_x(x), m_y(y) {}
Point::Point(double x, double y)
{
m_x = x;
m_y = y;
}
// getter/setter
double Point::getX() { return m_x; }
double Point::getY() { return m_y; }
void Point::setX(double x) { m_x = x; }
void Point::setY(double y) { m_y = y; }
}
// ===========================================================================
// End-of-File
// ===========================================================================