summaryrefslogtreecommitdiff
path: root/servers/physics_3d/joints
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-01-12 16:57:55 +0100
committerRémi Verschelde <rverschelde@gmail.com>2021-01-12 19:32:53 +0100
commitaf878716f2620fb9142b960253dc82f60ab23df2 (patch)
tree6ad992cca541f89ef5dba3b687ba170b82ee6087 /servers/physics_3d/joints
parentdf257f4fb6f0eadd204b91396854eee5d72ebd9b (diff)
CI: Update to clang-format 11 and apply ternary operator changes
Diffstat (limited to 'servers/physics_3d/joints')
-rw-r--r--servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
index 7eb49e657b..13b389251f 100644
--- a/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
+++ b/servers/physics_3d/joints/generic_6dof_joint_3d_sw.cpp
@@ -132,7 +132,7 @@ real_t G6DOFRotationalLimitMotor3DSW::solveAngularLimits(
real_t oldaccumImpulse = m_accumulatedImpulse;
real_t sum = oldaccumImpulse + clippedMotorImpulse;
- m_accumulatedImpulse = sum > hi ? real_t(0.) : sum < lo ? real_t(0.) : sum;
+ m_accumulatedImpulse = sum > hi ? real_t(0.) : (sum < lo ? real_t(0.) : sum);
clippedMotorImpulse = m_accumulatedImpulse - oldaccumImpulse;
@@ -201,7 +201,7 @@ real_t G6DOFTranslationalLimitMotor3DSW::solveLinearAxis(
real_t oldNormalImpulse = m_accumulatedImpulse[limit_index];
real_t sum = oldNormalImpulse + normalImpulse;
- m_accumulatedImpulse[limit_index] = sum > hi ? real_t(0.) : sum < lo ? real_t(0.) : sum;
+ m_accumulatedImpulse[limit_index] = sum > hi ? real_t(0.) : (sum < lo ? real_t(0.) : sum);
normalImpulse = m_accumulatedImpulse[limit_index] - oldNormalImpulse;
Vector3 impulse_vector = axis_normal_on_a * normalImpulse;