From b0c265ee3d94921f55266a679d3801a4d2b4505b Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 13 Feb 2022 19:55:53 +0100 Subject: refactor: move some components to a engine dir --- src/vector2.cpp | 58 --------------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 src/vector2.cpp (limited to 'src/vector2.cpp') diff --git a/src/vector2.cpp b/src/vector2.cpp deleted file mode 100644 index effc8b5..0000000 --- a/src/vector2.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "vector2.hpp" - -Vector2::Vector2(unsigned int x, unsigned int y) -{ - _x = x; - _y = y; -} - -unsigned int Vector2::x() const -{ - return _x; -} - -void Vector2::x(unsigned int x) -{ - _x = x; -} - -unsigned int Vector2::y() const -{ - return _y; -} - -void Vector2::y(unsigned int y) -{ - _y = y; -} - -std::shared_ptr Vector2::copy() -{ - return std::shared_ptr(new Vector2(*this)); -} - -Vector2 Vector2::operator+(const Vector2 vector2) -{ - return Vector2(_x + vector2.x(), _y + vector2.y()); -} - -Vector2 Vector2::operator-(const Vector2 vector2) -{ - return Vector2(_x - vector2.x(), _y - vector2.y()); -} - -Vector2 &Vector2::operator+=(const Vector2 &vector2) -{ - _x += vector2.x(); - _y += vector2.y(); - - return *this; -} - -Vector2 &Vector2::operator-=(const Vector2 &vector2) -{ - _x -= vector2.x(); - _y -= vector2.y(); - - return *this; -} -- cgit v1.2.3-18-g5258