summaryrefslogtreecommitdiff
path: root/src/helpers/Vector2D.hpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2022-12-16 17:17:31 +0000
committerGitHub <noreply@github.com>2022-12-16 17:17:31 +0000
commit98a4fa2b0d79298fa29b048a3ba15c3bf5aed8cd (patch)
tree64e78342cf08e5f9ad87bd5f6ea36233133be7bb /src/helpers/Vector2D.hpp
parent7c33c7fc64203c17b4f3625a16ae6b4774992c0e (diff)
Added clang format (#1239)
* clang-format stuff and format files
Diffstat (limited to 'src/helpers/Vector2D.hpp')
-rw-r--r--src/helpers/Vector2D.hpp12
1 files changed, 6 insertions, 6 deletions
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 <math.h>
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);
}