From 3dbf3b68c484704aafcda9fd05ae88a0337956ef Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 19 Mar 2022 13:28:29 +0100 Subject: feat: add inserting cells --- src/engine/data/vector2.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/engine/data/vector2.cpp') diff --git a/src/engine/data/vector2.cpp b/src/engine/data/vector2.cpp index dba745f..ba155b5 100644 --- a/src/engine/data/vector2.cpp +++ b/src/engine/data/vector2.cpp @@ -54,6 +54,16 @@ Vector2 Vector2::operator+(const Vector2 &vector2) const noexcept return new_vector2; } +Vector2 Vector2::operator-(const Vector2 &vector2) const noexcept +{ + auto new_vector2 = Vector2(*this); + + new_vector2._x -= vector2._x; + new_vector2._y -= vector2._y; + + return new_vector2; +} + Vector2 Vector2::operator*(const Vector2 &vector2) const noexcept { auto new_vector2 = Vector2(*this); -- cgit v1.2.3-18-g5258