aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Vector2.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-16 21:45:36 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-16 21:45:36 +0100
commit73598a9e7f49047d74ca439cb0f300099d8c03bf (patch)
treeef62148ac6769f169670a1e7f7fd8482045ef65f /src/crepe/api/Vector2.cpp
parentd258fcc8efdb6a968a220c4590a204292a16ad42 (diff)
parent121b64b1cb6cfead5814070c8b0185d3d7308095 (diff)
merge `master` into `loek/audio`
Diffstat (limited to 'src/crepe/api/Vector2.cpp')
-rw-r--r--src/crepe/api/Vector2.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/crepe/api/Vector2.cpp b/src/crepe/api/Vector2.cpp
index 97b74ac..30b968e 100644
--- a/src/crepe/api/Vector2.cpp
+++ b/src/crepe/api/Vector2.cpp
@@ -2,17 +2,11 @@
using namespace crepe;
-Vector2 Vector2::operator-(const Vector2 & other) const {
- return {x - other.x, y - other.y};
-}
+Vector2 Vector2::operator-(const Vector2 & other) const { return {x - other.x, y - other.y}; }
-Vector2 Vector2::operator+(const Vector2 & other) const {
- return {x + other.x, y + other.y};
-}
+Vector2 Vector2::operator+(const Vector2 & other) const { return {x + other.x, y + other.y}; }
-Vector2 Vector2::operator*(double scalar) const {
- return {x * scalar, y * scalar};
-}
+Vector2 Vector2::operator*(double scalar) const { return {x * scalar, y * scalar}; }
Vector2 & Vector2::operator*=(const Vector2 & other) {
x *= other.x;
@@ -34,10 +28,6 @@ Vector2 & Vector2::operator+=(double other) {
Vector2 Vector2::operator-() const { return {-x, -y}; }
-bool Vector2::operator==(const Vector2 & other) const {
- return x == other.x && y == other.y;
-}
+bool Vector2::operator==(const Vector2 & other) const { return x == other.x && y == other.y; }
-bool Vector2::operator!=(const Vector2 & other) const {
- return !(*this == other);
-}
+bool Vector2::operator!=(const Vector2 & other) const { return !(*this == other); }