Implementing clang-format and applying it to all classes
This commit is contained in:
@@ -31,68 +31,67 @@ struct Vector3 {
|
||||
|
||||
Vector3();
|
||||
|
||||
const real_t& operator[](int p_axis) const;
|
||||
const real_t &operator[](int p_axis) const;
|
||||
|
||||
real_t& operator[](int p_axis);
|
||||
real_t &operator[](int p_axis);
|
||||
|
||||
Vector3& operator+=(const Vector3& p_v);
|
||||
Vector3 &operator+=(const Vector3 &p_v);
|
||||
|
||||
Vector3 operator+(const Vector3& p_v) const;
|
||||
Vector3 operator+(const Vector3 &p_v) const;
|
||||
|
||||
Vector3& operator-=(const Vector3& p_v);
|
||||
Vector3 &operator-=(const Vector3 &p_v);
|
||||
|
||||
Vector3 operator-(const Vector3& p_v) const;
|
||||
Vector3 operator-(const Vector3 &p_v) const;
|
||||
|
||||
Vector3& operator*=(const Vector3& p_v);
|
||||
Vector3 &operator*=(const Vector3 &p_v);
|
||||
|
||||
Vector3 operator*(const Vector3& p_v) const;
|
||||
Vector3 operator*(const Vector3 &p_v) const;
|
||||
|
||||
Vector3& operator/=(const Vector3& p_v);
|
||||
Vector3 &operator/=(const Vector3 &p_v);
|
||||
|
||||
Vector3 operator/(const Vector3& p_v) const;
|
||||
Vector3 operator/(const Vector3 &p_v) const;
|
||||
|
||||
|
||||
Vector3& operator*=(real_t p_scalar);
|
||||
Vector3 &operator*=(real_t p_scalar);
|
||||
|
||||
Vector3 operator*(real_t p_scalar) const;
|
||||
|
||||
Vector3& operator/=(real_t p_scalar);
|
||||
Vector3 &operator/=(real_t p_scalar);
|
||||
|
||||
Vector3 operator/(real_t p_scalar) const;
|
||||
|
||||
Vector3 operator-() const;
|
||||
|
||||
bool operator==(const Vector3& p_v) const;
|
||||
bool operator==(const Vector3 &p_v) const;
|
||||
|
||||
bool operator!=(const Vector3& p_v) const;
|
||||
bool operator!=(const Vector3 &p_v) const;
|
||||
|
||||
bool operator<(const Vector3& p_v) const;
|
||||
bool operator<(const Vector3 &p_v) const;
|
||||
|
||||
bool operator<=(const Vector3& p_v) const;
|
||||
bool operator<=(const Vector3 &p_v) const;
|
||||
|
||||
Vector3 abs() const;
|
||||
|
||||
Vector3 ceil() const;
|
||||
|
||||
Vector3 cross(const Vector3& b) const;
|
||||
Vector3 cross(const Vector3 &b) const;
|
||||
|
||||
Vector3 linear_interpolate(const Vector3& p_b,real_t p_t) const;
|
||||
Vector3 linear_interpolate(const Vector3 &p_b, real_t p_t) const;
|
||||
|
||||
Vector3 cubic_interpolate(const Vector3& b, const Vector3& pre_a, const Vector3& post_b, const real_t t) const;
|
||||
Vector3 cubic_interpolate(const Vector3 &b, const Vector3 &pre_a, const Vector3 &post_b, const real_t t) const;
|
||||
|
||||
Vector3 bounce(const Vector3& p_normal) const;
|
||||
Vector3 bounce(const Vector3 &p_normal) const;
|
||||
|
||||
real_t length() const;
|
||||
|
||||
real_t length_squared() const;
|
||||
|
||||
real_t distance_squared_to(const Vector3& b) const;
|
||||
real_t distance_squared_to(const Vector3 &b) const;
|
||||
|
||||
real_t distance_to(const Vector3& b) const;
|
||||
real_t distance_to(const Vector3 &b) const;
|
||||
|
||||
real_t dot(const Vector3& b) const;
|
||||
real_t dot(const Vector3 &b) const;
|
||||
|
||||
real_t angle_to(const Vector3& b) const;
|
||||
real_t angle_to(const Vector3 &b) const;
|
||||
|
||||
Vector3 floor() const;
|
||||
|
||||
@@ -100,9 +99,7 @@ struct Vector3 {
|
||||
|
||||
bool is_normalized() const;
|
||||
|
||||
Basis outer(const Vector3& b) const;
|
||||
|
||||
|
||||
Basis outer(const Vector3 &b) const;
|
||||
|
||||
int max_axis() const;
|
||||
|
||||
@@ -112,13 +109,13 @@ struct Vector3 {
|
||||
|
||||
Vector3 normalized() const;
|
||||
|
||||
Vector3 reflect(const Vector3& by) const;
|
||||
Vector3 reflect(const Vector3 &by) const;
|
||||
|
||||
Vector3 rotated(const Vector3& axis, const real_t phi) const;
|
||||
Vector3 rotated(const Vector3 &axis, const real_t phi) const;
|
||||
|
||||
void rotate(const Vector3& p_axis,real_t p_phi);
|
||||
void rotate(const Vector3 &p_axis, real_t p_phi);
|
||||
|
||||
Vector3 slide(const Vector3& by) const;
|
||||
Vector3 slide(const Vector3 &by) const;
|
||||
|
||||
void snap(real_t p_val);
|
||||
|
||||
@@ -127,16 +124,15 @@ struct Vector3 {
|
||||
operator String() const;
|
||||
};
|
||||
|
||||
inline Vector3 operator*(real_t p_scalar, const Vector3& p_vec)
|
||||
{
|
||||
inline Vector3 operator*(real_t p_scalar, const Vector3 &p_vec) {
|
||||
return p_vec * p_scalar;
|
||||
}
|
||||
|
||||
inline Vector3 vec3_cross(const Vector3& p_a, const Vector3& p_b) {
|
||||
inline Vector3 vec3_cross(const Vector3 &p_a, const Vector3 &p_b) {
|
||||
|
||||
return p_a.cross(p_b);
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace godot
|
||||
|
||||
#endif // VECTOR3_H
|
||||
|
||||
Reference in New Issue
Block a user