Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Salazar <zanqdo@gmail.com>2011-02-19 01:15:43 +0300
committerDaniel Salazar <zanqdo@gmail.com>2011-02-19 01:15:43 +0300
commit65aac7c5069984da5d8441376304c910668583d2 (patch)
tree2b8e2576f5b620f917b4ba95c2c8f29a6e416987 /source/blender/nodes/intern
parent24d7606cb807e76372a71c508398c472a0627032 (diff)
Fix for building math nodes provided by DustyDingo
Diffstat (limited to 'source/blender/nodes/intern')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_math.c2
-rw-r--r--source/blender/nodes/intern/TEX_nodes/TEX_math.c2
2 files changed, 2 insertions, 2 deletions
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;
}
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_math.c b/source/blender/nodes/intern/TEX_nodes/TEX_math.c
index 3043cd756d0..c5adfa97fd4 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_math.c
+++ b/source/blender/nodes/intern/TEX_nodes/TEX_math.c
@@ -112,7 +112,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
} else {
float y_mod_1 = fmod(in1, 1);
if (y_mod_1 > 0.999 || y_mod_1 < 0.001) {
- *out = pow(in0, round(in1));
+ *out = pow(in0, floor(in1 + 0.5));
} else {
*out = 0.0;
}