summaryrefslogtreecommitdiffstats
path: root/core/math/basis.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-12-10 08:25:31 +0100
committerGitHub <noreply@github.com>2019-12-10 08:25:31 +0100
commit2845e6a21a9a1b7c8bf64dc49575213141a68832 (patch)
treeb4f82b8b4b733aa37dd877a0867a441d67a68d15 /core/math/basis.cpp
parent16fc023d4487c2a3f26b5bdd3827628de2cd0ba2 (diff)
parented1c4bc77db88fa0f8f599ca2d3c4b533a94a654 (diff)
downloadredot-engine-2845e6a21a9a1b7c8bf64dc49575213141a68832.tar.gz
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
Diffstat (limited to 'core/math/basis.cpp')
-rw-r--r--core/math/basis.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/math/basis.cpp b/core/math/basis.cpp
index d77501c0f6..09d04a8a2a 100644
--- a/core/math/basis.cpp
+++ b/core/math/basis.cpp
@@ -739,8 +739,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
if ((xx > yy) && (xx > zz)) { // elements[0][0] is the largest diagonal term
if (xx < epsilon) {
x = 0;
- y = 0.7071;
- z = 0.7071;
+ y = Math_SQRT12;
+ z = Math_SQRT12;
} else {
x = Math::sqrt(xx);
y = xy / x;
@@ -748,9 +748,9 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
}
} else if (yy > zz) { // elements[1][1] is the largest diagonal term
if (yy < epsilon) {
- x = 0.7071;
+ x = Math_SQRT12;
y = 0;
- z = 0.7071;
+ z = Math_SQRT12;
} else {
y = Math::sqrt(yy);
x = xy / y;
@@ -758,8 +758,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
}
} else { // elements[2][2] is the largest diagonal term so base result on this
if (zz < epsilon) {
- x = 0.7071;
- y = 0.7071;
+ x = Math_SQRT12;
+ y = Math_SQRT12;
z = 0;
} else {
z = Math::sqrt(zz);