[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37291] trunk/blender/source/blender/nodes /intern/CMP_nodes/CMP_math.c: error pointed out by Jeroen Bakker with the math nodes round function.

Campbell Barton ideasman42 at gmail.com
Tue Jun 7 09:57:26 CEST 2011


Revision: 37291
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37291
Author:   campbellbarton
Date:     2011-06-07 07:57:26 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
error pointed out by Jeroen Bakker with the math nodes round function. was incorrectly using the output rather then the input.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_math.c

Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_math.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_math.c	2011-06-07 06:14:28 UTC (rev 37290)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_math.c	2011-06-07 07:57:26 UTC (rev 37291)
@@ -140,7 +140,7 @@
 		break;
 	case 14: /* Round */
 		{
-				out[0]= (out[0]<0)?(int)(in[0] - 0.5f):(int)(in[0] + 0.5f);
+				out[0]= floorf(in[0] + 0.5f);
 		}
 		break;
 	case 15: /* Less Than */




More information about the Bf-blender-cvs mailing list