From 65aac7c5069984da5d8441376304c910668583d2 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Fri, 18 Feb 2011 22:15:43 +0000 Subject: Fix for building math nodes provided by DustyDingo --- source/blender/nodes/intern/CMP_nodes/CMP_math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_math.c') diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c index adeef050ec0..f5ca9bb9959 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_math.c @@ -101,7 +101,7 @@ static void do_math(bNode *node, float *out, float *in, float *in2) float y_mod_1 = fmod(in2[0], 1); /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */ if (y_mod_1 > 0.999 || y_mod_1 < 0.001) { - out[0]= pow(in[0], round(in2[0])); + out[0]= pow(in[0], floor(in2[0] + 0.5)); } else { out[0] = 0.0; } -- cgit v1.2.3