summaryrefslogtreecommitdiff
path: root/src/point.cpp
diff options
context:
space:
mode:
authorSimponic <loganthebean222@gmail.com>2020-11-06 11:48:27 -0700
committerSimponic <loganthebean222@gmail.com>2020-11-06 11:48:27 -0700
commitf4e392912a3812b602f787c6db30296cea14962e (patch)
tree0207b67ab6bb4bca46f56b2fa51d23b5433bb2f4 /src/point.cpp
downloadtozy-f4e392912a3812b602f787c6db30296cea14962e.tar.gz
tozy-f4e392912a3812b602f787c6db30296cea14962e.zip
Added files
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();
+}