[Bf-committers] msvc 7.1+ scons : iin node_shader.c, function "round" not reconized

jmsoler at free.fr jmsoler at free.fr
Wed Aug 2 10:32:03 CEST 2006


Is "in[0]->vec[0]"  not a float value ?
one could use :
out[0]->vec[0]= ceil(in[0]->vec[0]+.5f);

Selon jmsoler at free.fr:

> More accurate than the math.h's  ceil  function  . It seems that Matt Ebb has
> already made a patch for this .
>
> Selon lguillaume <lecocqguillaume at gmail.com>:
>
> > Brecht says we can use (int)(x+.5f) to change round(x) function for MSVC
> >
> > 2006/8/2, jean-michel soler <jmsoler at free.fr>:
> > >
> > > static void node_shader_exec_math(void *data, bNode *node, bNodeStack
> > > **in, bNodeStack **out)
> > > ...
> > > line 618 :   out[0]->vec[0]= round(in[0]->vec[0]);
> > >
> > > MSVC 7.1 complains and do not end the compilation .
> > >
> > > jms
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>




More information about the Bf-committers mailing list