diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-28 16:00:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 16:00:12 +0100 |
commit | 058f3fe069402978780f87ed383e3a72d4b3009e (patch) | |
tree | e0d0fff64ccd8bdc1dda36e7f695b6bc17c5bb52 /servers/physics_2d/body_pair_2d_sw.cpp | |
parent | 18bbd6410f3ea9fad52fafe3fb90c44c4c130aaa (diff) | |
parent | a24c38d1a814f5bc4979b99d6652f4bf2f2982c7 (diff) |
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
Diffstat (limited to 'servers/physics_2d/body_pair_2d_sw.cpp')
-rw-r--r-- | servers/physics_2d/body_pair_2d_sw.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp index bb6629becb..b9f61acb12 100644 --- a/servers/physics_2d/body_pair_2d_sw.cpp +++ b/servers/physics_2d/body_pair_2d_sw.cpp @@ -409,7 +409,7 @@ bool BodyPair2DSW::setup(real_t p_step) { kNormal += A->get_inv_inertia() * (c.rA.dot(c.rA) - rnA * rnA) + B->get_inv_inertia() * (c.rB.dot(c.rB) - rnB * rnB); c.mass_normal = 1.0f / kNormal; - Vector2 tangent = c.normal.tangent(); + Vector2 tangent = c.normal.orthogonal(); real_t rtA = c.rA.dot(tangent); real_t rtB = c.rB.dot(tangent); real_t kTangent = A->get_inv_mass() + B->get_inv_mass(); @@ -469,7 +469,7 @@ void BodyPair2DSW::solve(real_t p_step) { real_t vn = dv.dot(c.normal); real_t vbn = dbv.dot(c.normal); - Vector2 tangent = c.normal.tangent(); + Vector2 tangent = c.normal.orthogonal(); real_t vt = dv.dot(tangent); real_t jbn = (c.bias - vbn) * c.mass_normal; |