diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-28 21:08:33 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-28 21:08:33 +0400 |
commit | 9b9c4184c88c49ff96f3f23cbfbd00f6811d7301 (patch) | |
tree | 4c5aaf763f28710d07b3ec364088a98de8ae9794 /source/blender/nodes/intern/TEX_nodes/TEX_math.c | |
parent | faf07c3e2b6cb180d1580b4160ff6534b4754b76 (diff) |
misc nodes & editors: floats were being implicitly promoted to doubles, adjust to use floats.
+ minor update to demo_mode
Diffstat (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_math.c')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_math.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_math.c b/source/blender/nodes/intern/TEX_nodes/TEX_math.c index a84573f1d09..1652ba10e48 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_math.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_math.c @@ -116,8 +116,8 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor out[0]= pow(in0, in1); } else { float y_mod_1 = fmod(in1, 1); - if (y_mod_1 > 0.999 || y_mod_1 < 0.001) { - *out = pow(in0, floor(in1 + 0.5)); + if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) { + *out = pow(in0, floor(in1 + 0.5f)); } else { *out = 0.0; } |