From 98a4fa2b0d79298fa29b048a3ba15c3bf5aed8cd Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Fri, 16 Dec 2022 17:17:31 +0000 Subject: Added clang format (#1239) * clang-format stuff and format files --- src/helpers/Vector2D.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/helpers/Vector2D.hpp') diff --git a/src/helpers/Vector2D.hpp b/src/helpers/Vector2D.hpp index 557cdb53..f2f47e6b 100644 --- a/src/helpers/Vector2D.hpp +++ b/src/helpers/Vector2D.hpp @@ -3,7 +3,7 @@ #include class Vector2D { - public: + public: Vector2D(double, double); Vector2D(); ~Vector2D(); @@ -12,18 +12,18 @@ class Vector2D { double y = 0; // returns the scale - double normalize(); + double normalize(); - Vector2D operator+(const Vector2D a) const { + Vector2D operator+(const Vector2D& a) const { return Vector2D(this->x + a.x, this->y + a.y); } - Vector2D operator-(const Vector2D a) const { + Vector2D operator-(const Vector2D& a) const { return Vector2D(this->x - a.x, this->y - a.y); } - Vector2D operator*(const float a) const { + Vector2D operator*(const float& a) const { return Vector2D(this->x * a, this->y * a); } - Vector2D operator/(const float a) const { + Vector2D operator/(const float& a) const { return Vector2D(this->x / a, this->y / a); } -- cgit v1.2.3