--
[ Picked text/plain from multipart/alternative ]
Probably because of the global function pointer that is used by
VectorNormalize to use the best performance method available (depending on
CPU), should not be used within a class. That would, I consider, be bad
practice.
On 3/24/06, Jorge Rodriguez <[EMAIL PROTECTED]> wrote:
>
> Tei wrote:
>
> >Theres the C version:
> >
> >float VectorNormalize (vec3_t v){
> > float length, ilength;
> >
> > length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
> > length = sqrt (length); // FIXME
> >
> > if (length) {
> > ilength = 1/length;
> > v[0] *= ilength;
> > v[1] *= ilength;
> > v[2] *= ilength;
> > }
> >
> > return length;
> >}
> >
> >Quake 1 source:
> >http://www.untitled-game.org/source/mathlibc.html
> >
> >Thats why return a float. Because is C code. And is the right thing
> >for "Think in C" mode. But is the wrong thing for "Think in OOP" mode.
> >So is right that Valve change this stuff.
> >
> >
> Nevermind.
>
> --
> Jorge "Vino" Rodriguez
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--
Programmer for RnL
www.resistanceandliberation.com
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders