Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-11-04 11:18:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-11-04 11:18:29 +0400
commitfae6c35ca7ae4e73cc32a0f5c235fd0ff8f00be1 (patch)
tree7caea3d796c18cddf661960a243de565847173c5 /source/blender/blenlib/intern/math_rotation.c
parent89a454653e9ff7704671aeb371b1b387af6152dc (diff)
code cleanup: quiet -Wdouble-promotion, disabled this warnings for a few files since its done throughout the code in some places.
Diffstat (limited to 'source/blender/blenlib/intern/math_rotation.c')
-rw-r--r--source/blender/blenlib/intern/math_rotation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 589e6462f62..b0c4724e1ec 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -234,7 +234,7 @@ void quat_to_mat4(float m[][4], const float q[4])
double q0, q1, q2, q3, qda, qdb, qdc, qaa, qab, qac, qbb, qbc, qcc;
#ifdef DEBUG
- if (!((q0 = dot_qtqt(q, q)) == 0.0f || (fabsf(q0 - 1.0) < (float)QUAT_EPSILON))) {
+ if (!((q0 = dot_qtqt(q, q)) == 0.0 || (fabs(q0 - 1.0) < QUAT_EPSILON))) {
fprintf(stderr, "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n", (float)q0);
}
#endif
@@ -288,9 +288,9 @@ void mat3_to_quat(float q[4], float wmat[][3])
s = sqrt(tr);
q[0] = (float)s;
s = 1.0 / (4.0 * s);
- q[1] = (float)((mat[1][2] - mat[2][1]) * s);
- q[2] = (float)((mat[2][0] - mat[0][2]) * s);
- q[3] = (float)((mat[0][1] - mat[1][0]) * s);
+ q[1] = (float)((double)(mat[1][2] - mat[2][1]) * s);
+ q[2] = (float)((double)(mat[2][0] - mat[0][2]) * s);
+ q[3] = (float)((double)(mat[0][1] - mat[1][0]) * s);
}
else {
if (mat[0][0] > mat[1][1] && mat[0][0] > mat[2][2]) {