diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 22:23:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-03 22:23:30 +0400 |
commit | 9b948717b019fbd8e511595bd23ed1970b077085 (patch) | |
tree | 52e9203e26a4900b43bb82e699f6ca8a8a5b2cda /source/blender/blenlib/intern | |
parent | a18ead1521ccd14d45adc335dd1dddd89a71cc96 (diff) |
code cleanup: float <> double conversion.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/math_rotation.c | 6 | ||||
-rw-r--r-- | source/blender/blenlib/intern/voronoi.c | 2 |
2 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 70d9ef27734..589e6462f62 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) < QUAT_EPSILON))) { + if (!((q0 = dot_qtqt(q, q)) == 0.0f || (fabsf(q0 - 1.0) < (float)QUAT_EPSILON))) { fprintf(stderr, "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n", (float)q0); } #endif @@ -1077,11 +1077,11 @@ void compatible_eul(float eul[3], const float oldrot[3]) for (i = 0; i < 3; i++) { deul[i] = eul[i] - oldrot[i]; if (deul[i] > pi_thresh) { - eul[i] -= floorf(( deul[i] / pi_x2) + 0.5) * pi_x2; + eul[i] -= floorf(( deul[i] / pi_x2) + 0.5f) * pi_x2; deul[i] = eul[i] - oldrot[i]; } else if (deul[i] < -pi_thresh) { - eul[i] += floorf((-deul[i] / pi_x2) + 0.5) * pi_x2; + eul[i] += floorf((-deul[i] / pi_x2) + 0.5f) * pi_x2; deul[i] = eul[i] - oldrot[i]; } } diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c index 9674012a73d..0d411038b3e 100644 --- a/source/blender/blenlib/intern/voronoi.c +++ b/source/blender/blenlib/intern/voronoi.c @@ -39,7 +39,7 @@ #include "BLI_voronoi.h" #include "BLI_utildefines.h" -#define VORONOI_EPS 1e-2 +#define VORONOI_EPS 1e-2f enum { voronoiEventType_Site = 0, |