summaryrefslogtreecommitdiff
path: root/servers/physics
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics')
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.cpp2
-rw-r--r--servers/physics/joints/hinge_joint_sw.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp
index 1b3de3e913..cd86128dc3 100644
--- a/servers/physics/joints/cone_twist_joint_sw.cpp
+++ b/servers/physics/joints/cone_twist_joint_sw.cpp
@@ -53,7 +53,7 @@ Written by: Marcus Hennix
static void plane_space(const Vector3 &n, Vector3 &p, Vector3 &q) {
- if (Math::abs(n.z) > 0.707106781186547524400844362) {
+ if (Math::abs(n.z) > Math_SQRT12) {
// choose p in y-z plane
real_t a = n[1] * n[1] + n[2] * n[2];
real_t k = 1.0 / Math::sqrt(a);
diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp
index 209cddda5e..633f0b4921 100644
--- a/servers/physics/joints/hinge_joint_sw.cpp
+++ b/servers/physics/joints/hinge_joint_sw.cpp
@@ -51,7 +51,7 @@ subject to the following restrictions:
static void plane_space(const Vector3 &n, Vector3 &p, Vector3 &q) {
- if (Math::abs(n.z) > 0.707106781186547524400844362) {
+ if (Math::abs(n.z) > Math_SQRT12) {
// choose p in y-z plane
real_t a = n[1] * n[1] + n[2] * n[2];
real_t k = 1.0 / Math::sqrt(a);