diff options
author | Raul Santos <raulsntos@gmail.com> | 2021-11-29 18:02:42 +0100 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2021-12-01 21:14:46 +0100 |
commit | a367378f9ebc95cbd4e595feb95dd64b0f3f2c22 (patch) | |
tree | 582d3171e00bfc62b913093e88d1ca6a1ca82b6c /core/math | |
parent | b9d877e55fc469e7441cb00856359946b91d00ff (diff) |
Rename Vector parameters to be consistent
Renames parameters that were named differently across different
scripting languages or their documentation to use the same name
everywhere.
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/vector3.cpp | 8 | ||||
-rw-r--r-- | core/math/vector3.h | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp index 42e3da0b27..b9bd04b8c1 100644 --- a/core/math/vector3.cpp +++ b/core/math/vector3.cpp @@ -108,10 +108,10 @@ Vector3 Vector3::move_toward(const Vector3 &p_to, const real_t p_delta) const { return len <= p_delta || len < CMP_EPSILON ? p_to : v + vd / len * p_delta; } -Basis Vector3::outer(const Vector3 &p_b) const { - Vector3 row0(x * p_b.x, x * p_b.y, x * p_b.z); - Vector3 row1(y * p_b.x, y * p_b.y, y * p_b.z); - Vector3 row2(z * p_b.x, z * p_b.y, z * p_b.z); +Basis Vector3::outer(const Vector3 &p_with) const { + Vector3 row0(x * p_with.x, x * p_with.y, x * p_with.z); + Vector3 row1(y * p_with.x, y * p_with.y, y * p_with.z); + Vector3 row2(z * p_with.x, z * p_with.y, z * p_with.z); return Basis(row0, row1, row2); } diff --git a/core/math/vector3.h b/core/math/vector3.h index 02a56f684e..6c21968aae 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -128,9 +128,9 @@ struct Vector3 { return n.normalized(); } - _FORCE_INLINE_ Vector3 cross(const Vector3 &p_b) const; - _FORCE_INLINE_ real_t dot(const Vector3 &p_b) const; - Basis outer(const Vector3 &p_b) const; + _FORCE_INLINE_ Vector3 cross(const Vector3 &p_with) const; + _FORCE_INLINE_ real_t dot(const Vector3 &p_with) const; + Basis outer(const Vector3 &p_with) const; _FORCE_INLINE_ Vector3 abs() const; _FORCE_INLINE_ Vector3 floor() const; @@ -199,17 +199,17 @@ struct Vector3 { } }; -Vector3 Vector3::cross(const Vector3 &p_b) const { +Vector3 Vector3::cross(const Vector3 &p_with) const { Vector3 ret( - (y * p_b.z) - (z * p_b.y), - (z * p_b.x) - (x * p_b.z), - (x * p_b.y) - (y * p_b.x)); + (y * p_with.z) - (z * p_with.y), + (z * p_with.x) - (x * p_with.z), + (x * p_with.y) - (y * p_with.x)); return ret; } -real_t Vector3::dot(const Vector3 &p_b) const { - return x * p_b.x + y * p_b.y + z * p_b.z; +real_t Vector3::dot(const Vector3 &p_with) const { + return x * p_with.x + y * p_with.y + z * p_with.z; } Vector3 Vector3::abs() const { |