From b659e1eb2b732ebc836614735438ca0bcdc8a32d Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Wed, 16 Jan 2019 10:42:53 -0500 Subject: Use approximate equallity methods in many places --- servers/physics/joints/generic_6dof_joint_sw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers/physics/joints/generic_6dof_joint_sw.cpp') diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp index 756348f448..813d9b7704 100644 --- a/servers/physics/joints/generic_6dof_joint_sw.cpp +++ b/servers/physics/joints/generic_6dof_joint_sw.cpp @@ -107,7 +107,7 @@ real_t G6DOFRotationalLimitMotorSW::solveAngularLimits( // correction velocity real_t motor_relvel = m_limitSoftness * (target_velocity - m_damping * rel_vel); - if (motor_relvel < CMP_EPSILON && motor_relvel > -CMP_EPSILON) { + if (Math::is_zero_approx(motor_relvel)) { return 0.0f; //no need for applying force } -- cgit v1.2.3