[Bf-committers] msvc6 not compiling with latest node commit

Joe Eagar joeedh at gmail.com
Thu Nov 16 05:11:57 CET 2006


. . .and here's the patch.
Joe Eagar wrote:
> Hi.  bjornmose was having trouble compiling with MSVC6; the problem 
> was the use of atanf in node_composite.c
>
> Anyway, here's a little patch to switch it to atan, which is supported 
> by MSVC6.  This can temporarily help MSVC6 users; however, a better 
> solution would be an #ifdef that detects if the compile is msvc6 and 
> if so defines atanf(a) atan(double(a)).
>
> I however have no idea how to do that, so someone else will have to 
> figure it out :)
>
> Joe
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>

-------------- next part --------------
Index: source/blender/blenkernel/intern/node_composite.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenkernel/intern/node_composite.c,v
retrieving revision 1.69
diff -u -r1.69 node_composite.c
--- source/blender/blenkernel/intern/node_composite.c	15 Nov 2006 16:55:40 -0000	1.69
+++ source/blender/blenkernel/intern/node_composite.c	16 Nov 2006 00:28:13 -0000
@@ -3672,14 +3672,14 @@
 	{
 		case 1:  /*green*/
 		{
-			x=(atanf((c->t1*in[1])-(c->t1*c->t2))+1)/2;
-			z=(atanf((c->t3*in[2])-(c->t3*c->fsize))+1)/2;
+			x=(atan((double)((c->t1*in[1])-(c->t1*c->t2)))+1)/2;
+			z=(atan((double)((c->t3*in[2])-(c->t3*c->fsize)))+1)/2;
 			break;
 		}
 		case 2:  /*blue*/
 		{
-			x=(atanf((c->t1*in[1])-(c->t1*c->t2))+1)/2;
-			z=(atanf((c->t3*in[2])-(c->t3*c->fsize))+1)/2;
+			x=(atan((double)((c->t1*in[1])-(c->t1*c->t2)))+1)/2;
+			z=(atan((double)((c->t3*in[2])-(c->t3*c->fsize)))+1)/2;
 			x=1-x;
 			break;
 		}


More information about the Bf-committers mailing list