summaryrefslogtreecommitdiff
path: root/src/point.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/point.cpp')
-rw-r--r--src/point.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/point.cpp b/src/point.cpp
new file mode 100644
index 0000000..4b89a4a
--- /dev/null
+++ b/src/point.cpp
@@ -0,0 +1,33 @@
+#include "point.h"
+#include "velocity.h"
+
+Point :: Point() {
+ setX(0.0f);
+ setY(0.0f);
+}
+
+Point :: Point (const float x, const float y) {
+ setX(x);
+ setY(y);
+}
+
+void Point :: setX(const float x) {
+ this->x = x;
+}
+
+void Point :: setY(const float y) {
+ this->y = y;
+}
+
+float Point :: getX() {
+ return this->x;
+}
+
+float Point :: getY() {
+ return this->y;
+}
+
+void Point :: update(Velocity &vel) {
+ this->x += vel.getDx();
+ this->y += vel.getDy();
+}