aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers/Vector2D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Vector2D.cpp')
-rw-r--r--src/helpers/Vector2D.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/helpers/Vector2D.cpp b/src/helpers/Vector2D.cpp
index a96411e6..97a9685c 100644
--- a/src/helpers/Vector2D.cpp
+++ b/src/helpers/Vector2D.cpp
@@ -6,7 +6,11 @@ Vector2D::Vector2D(double xx, double yy) {
y = yy;
}
-Vector2D::Vector2D() { x = 0; y = 0; }
+Vector2D::Vector2D() {
+ x = 0;
+ y = 0;
+}
+
Vector2D::~Vector2D() {}
double Vector2D::normalize() {
@@ -24,8 +28,5 @@ Vector2D Vector2D::floor() {
}
Vector2D Vector2D::clamp(const Vector2D& min, const Vector2D& max) {
- return Vector2D(
- std::clamp(this->x, min.x, max.x == 0 ? INFINITY : max.x),
- std::clamp(this->y, min.y, max.y == 0 ? INFINITY : max.y)
- );
+ return Vector2D(std::clamp(this->x, min.x, max.x == 0 ? INFINITY : max.x), std::clamp(this->y, min.y, max.y == 0 ? INFINITY : max.y));
} \ No newline at end of file