Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
parent
710b34b702
commit
0be6d925dc
1552 changed files with 1 additions and 33876 deletions
|
|
@ -37,7 +37,6 @@
|
|||
struct Vector2i;
|
||||
|
||||
struct Vector2 {
|
||||
|
||||
enum Axis {
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
|
|
@ -123,13 +122,11 @@ struct Vector2 {
|
|||
real_t angle() const;
|
||||
|
||||
_FORCE_INLINE_ Vector2 abs() const {
|
||||
|
||||
return Vector2(Math::abs(x), Math::abs(y));
|
||||
}
|
||||
|
||||
Vector2 rotated(real_t p_by) const;
|
||||
Vector2 tangent() const {
|
||||
|
||||
return Vector2(y, -x);
|
||||
}
|
||||
|
||||
|
|
@ -150,81 +147,65 @@ struct Vector2 {
|
|||
};
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::plane_project(real_t p_d, const Vector2 &p_vec) const {
|
||||
|
||||
return p_vec - *this * (dot(p_vec) - p_d);
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ Vector2 operator*(real_t p_scalar, const Vector2 &p_vec) {
|
||||
|
||||
return p_vec * p_scalar;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator+(const Vector2 &p_v) const {
|
||||
|
||||
return Vector2(x + p_v.x, y + p_v.y);
|
||||
}
|
||||
_FORCE_INLINE_ void Vector2::operator+=(const Vector2 &p_v) {
|
||||
|
||||
x += p_v.x;
|
||||
y += p_v.y;
|
||||
}
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator-(const Vector2 &p_v) const {
|
||||
|
||||
return Vector2(x - p_v.x, y - p_v.y);
|
||||
}
|
||||
_FORCE_INLINE_ void Vector2::operator-=(const Vector2 &p_v) {
|
||||
|
||||
x -= p_v.x;
|
||||
y -= p_v.y;
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator*(const Vector2 &p_v1) const {
|
||||
|
||||
return Vector2(x * p_v1.x, y * p_v1.y);
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator*(const real_t &rvalue) const {
|
||||
|
||||
return Vector2(x * rvalue, y * rvalue);
|
||||
};
|
||||
_FORCE_INLINE_ void Vector2::operator*=(const real_t &rvalue) {
|
||||
|
||||
x *= rvalue;
|
||||
y *= rvalue;
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator/(const Vector2 &p_v1) const {
|
||||
|
||||
return Vector2(x / p_v1.x, y / p_v1.y);
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator/(const real_t &rvalue) const {
|
||||
|
||||
return Vector2(x / rvalue, y / rvalue);
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ void Vector2::operator/=(const real_t &rvalue) {
|
||||
|
||||
x /= rvalue;
|
||||
y /= rvalue;
|
||||
};
|
||||
|
||||
_FORCE_INLINE_ Vector2 Vector2::operator-() const {
|
||||
|
||||
return Vector2(-x, -y);
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ bool Vector2::operator==(const Vector2 &p_vec2) const {
|
||||
|
||||
return x == p_vec2.x && y == p_vec2.y;
|
||||
}
|
||||
_FORCE_INLINE_ bool Vector2::operator!=(const Vector2 &p_vec2) const {
|
||||
|
||||
return x != p_vec2.x || y != p_vec2.y;
|
||||
}
|
||||
|
||||
Vector2 Vector2::lerp(const Vector2 &p_b, real_t p_t) const {
|
||||
|
||||
Vector2 res = *this;
|
||||
|
||||
res.x += (p_t * (p_b.x - x));
|
||||
|
|
@ -253,7 +234,6 @@ typedef Vector2 Point2;
|
|||
/* INTEGER STUFF */
|
||||
|
||||
struct Vector2i {
|
||||
|
||||
enum Axis {
|
||||
AXIS_X,
|
||||
AXIS_Y,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue