|
![](/i/fill.gif) |
In article <3b71858f@news.povray.org> , "Thorsten Froehlich"
<tho### [at] trf de> wrote:
> In article <3B718365.C2F57AE1@comtrade.ee> , Vahur Krouverk
> <vkr### [at] comtrade ee> wrote:
>
>> Hmm, are you sure in it? Generally such expression
>> x=y*z;
>> should not modify y or z, but your proposal will change y. I guess that
>> you confuse operator * with operator *= in this case?
I check. Of course you are right, I confused it...
I guess I should concentrate or not answer a question. Sorry for the
confusion, Peter! thanks for noticing my mistake Vahur!
I canceled my previous two posts. Only the following remark is still valid
and already contradicts what I said earlier in the same post because if
VCross inside the class would modify the object, VCross outside the class
would be a different function, which it is not...
>>
Further, you define some functions in the class and then again outside, for
example VCross.
Also, I would strongly recommend to normalise vectors only when necessary.
sqrt is not only slow, but if you scale the vector a lot this way (you do so
for nearly every vector operation) the error will build up and might be
significant in the end. At least you should make Update an inline function
to not waste more time on yet another function call.
<<
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trf de
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
![](/i/fill.gif) |