Added clang format (#1239)

* clang-format stuff and format files
This commit is contained in:
Vaxry 2022-12-16 17:17:31 +00:00 committed by GitHub
parent 7c33c7fc64
commit 98a4fa2b0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
90 changed files with 4118 additions and 3993 deletions

View file

@ -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));
}