diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics/joints/cone_twist_joint_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics/joints/hinge_joint_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 2 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 2 |
4 files changed, 4 insertions, 4 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); diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index 80e204087a..73baab2dd6 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -174,7 +174,7 @@ void Physics2DServerSW::_shape_col_cbk(const Vector2 &p_point_A, const Vector2 & } Vector2 rel_dir = (p_point_A - p_point_B).normalized(); - if (cbk->valid_dir.dot(rel_dir) < 0.7071) { //sqrt(2)/2.0 - 45 degrees + if (cbk->valid_dir.dot(rel_dir) < Math_SQRT12) { //sqrt(2)/2.0 - 45 degrees cbk->invalid_by_dir++; /* diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index a7ff4f35db..1aceb8dcd8 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -2912,7 +2912,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons tk = _get_token(); if (tk.type == TK_PARENTHESIS_OPEN) { //a function - StringName name = identifier; + const StringName &name = identifier; OperatorNode *func = alloc_node<OperatorNode>(); func->op = OP_CALL; |