|
![](/i/fill.gif) |
On Tue, 16 Apr 2002 21:27:42 +0200, "Rune" <run### [at] mobilixnet dk>
wrote:
> > 3. First loop use two locals but can be realised with only one.
> > Here is my version of first loop with speed optimization
> > but without annoying #debug
>
> Whoops, the debug is a leftover from my tests. Don't know how it got
> there...
>
> Actually, the test to see if the vector has zero length is also a leftover
> from the debugging. Currently the macro should never reach that part anyway,
> so it can be removed completely. I will do so.
Your changes seems better now except AFAIK you not necessary normalize vector
before calculating cross product (you only inrease floating point error at
this moment) in HFCreate_() macro. Consider below example:
#include "strings"
#local A=<126,45,33>;
#local B=<63,12,7>/1000;
#declare C=vnormalize(vcross(vnormalize(A),vnormalize(B)));
#declare D=vnormalize(vcross(A,B));
#warning VStr(C)
#warning VStr(D)
ABX
Post a reply to this message
|
![](/i/fill.gif) |