|
|
In article <slr### [at] fwicom> , ron### [at] povrayorg (Ron
Parker) wrote:
>>But I tried to define a sqr macro as follows:
>>
>>#macro sqr(A)
>>A*A
>>#end
>>
>>and I got
>>
>>Parse Error: Expected 'undeclared identifier', sqr found instead.
>
> What if you define it as a function instead, since that's what you really
> want?
I would not recommend using a function for such a simple case. It will work
for sure, but there is some overhead involved that (if used carelessly) can
slow down rendering of isosurfaces a lot. The built-in operators should be
used whenever possible as they offer by far the best performance.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|