diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-11 12:15:13 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-11 12:15:13 +0400 |
commit | b4a0152e76683dfb170c3e2796e15e1b5b67e2ab (patch) | |
tree | 15466a4e658f8fd42d55b9748bbeb6f02c12ba30 /source/blender/blenlib | |
parent | 9ae0523921fa4baeb37bcdd36f208da952f4337f (diff) |
code cleanup: float formatting was confusing in some cases - eg: (0.,0.,0.)
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/math_base.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/noise.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c index 9efcb3dbcae..6bb238ac612 100644 --- a/source/blender/blenlib/intern/math_base.c +++ b/source/blender/blenlib/intern/math_base.c @@ -37,8 +37,8 @@ /* from python 3.1 pymath.c */ double copysign(double x, double y) { - /* use atan2 to distinguish -0. from 0. */ - if (y > 0. || (y == 0. && atan2(y, -1.) > 0.)) { + /* use atan2 to distinguish -0.0 from 0.0 */ + if (y > 0.0 || (y == 0.0 && atan2(y, -1.0) > 0.0)) { return fabs(x); } else { diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index f1749d0b7cd..5db42c35f5c 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -1002,11 +1002,11 @@ static float turbulence_perlin(float *point, float lofreq, float hifreq) p[2] = point[2]; t = 0; - for (freq = lofreq ; freq < hifreq ; freq *= 2.) { + for (freq = lofreq ; freq < hifreq ; freq *= 2.0) { t += fabsf(noise3_perlin(p)) / freq; - p[0] *= 2.; - p[1] *= 2.; - p[2] *= 2.; + p[0] *= 2.0f; + p[1] *= 2.0f; + p[2] *= 2.0f; } return t - 0.3; /* readjust to make mean value = 0.0 */ } |