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

Branan Riley branan at gmail.com
Wed Aug 2 22:06:41 CEST 2006


cast to int is a single FPU instruction (at least on x86). no sense using
ceil(), which probably takes more time than that.

Branan


On 8/2/06, jmsoler at free.fr <jmsoler at free.fr> wrote:
>
> 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
> >
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.blender.org/pipermail/bf-committers/attachments/20060802/babc3bcd/attachment.html


More information about the Bf-committers mailing list