diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-11-06 04:18:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-11-06 04:18:01 +0400 |
commit | a9fb70754f5dc5e5a0deaf0b5b8e99de8f78938e (patch) | |
tree | 8f2736a07ce8f84b1c226c689010157464ac9c78 /source/blender/nodes | |
parent | 2638728bd22d682e38d7eac2eb0a4b85edd3ff39 (diff) |
avoid using function calls in macros that result in multiple function calls.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_math.c | 2 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_math.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c index bbd44c58314..5bc67adf5fb 100644 --- a/source/blender/nodes/composite/nodes/node_composite_math.c +++ b/source/blender/nodes/composite/nodes/node_composite_math.c @@ -103,7 +103,7 @@ static void do_math(bNode *node, float *out, float *in, float *in2) out[0] = pow(in[0], in2[0]); } else { - float y_mod_1 = ABS(fmod(in2[0], 1)); + float y_mod_1 = fabsf(fmodf(in2[0], 1.0f)); /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */ if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) { diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c index 9dc900e6bd4..1c2b0c3e7b3 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.c +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -142,7 +142,7 @@ bNodeStack **out) out[0]->vec[0] = pow(in[0]->vec[0], in[1]->vec[0]); } else { - float y_mod_1 = ABS(fmod(in[1]->vec[0], 1)); + float y_mod_1 = fabsf(fmodf(in[1]->vec[0], 1.0f)); /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */ if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) { |