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:
authorLukas Toenne <lukas.toenne@googlemail.com>2011-03-06 16:11:57 +0300
committerLukas Toenne <lukas.toenne@googlemail.com>2011-03-06 16:11:57 +0300
commit8a312979ef02fbcd382329d9287021acebf213f3 (patch)
tree24a8dc34691a2aa356c378c44f1ebbbea253a09b /source/blender/nodes/intern/CMP_nodes/CMP_math.c
parenta803fb095ceb4c8eb3f1c8a4993f798dfa13143c (diff)
Applied patch by Alexander Kuznetsov for bug 26373: math node 'round' mode was not working correctly for negative numbers.
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_math.c')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/intern/CMP_nodes/CMP_math.c
index 09c08f01a8a..039f7e6fab1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_math.c
@@ -140,7 +140,7 @@ static void do_math(bNode *node, float *out, float *in, float *in2)
break;
case 14: /* Round */
{
- out[0]= (int)(in[0] + 0.5f);
+ out[0]= (out[0]<0)?(int)(in[0] - 0.5f):(int)(in[0] + 0.5f);
}
break;
case 15: /* Less Than */