|
![](/i/fill.gif) |
On Mon, 26 Feb 2001 09:12:37 -0500, Greg M. Johnson wrote:
>"Greg M. Johnson" wrote:
>
>> #macro rdr()
>> (rand(RRR)-0.5)+(rand(RRR)-0.5)+(rand(RRR)-0.5)+(rand(RRR)-0.5)
>> #end
>
>If you replace that macro with this one, the world returns to normal.
I'll bet it doesn't really.
>WHY!? Is there an error in what povray (note: using mega 0.6) does with
>parens???
It's not an error, but it might be unexpected if you think macros act like
functions. This line:
#declare brakepct= 0.91+0.05*rdr();
is parsed as
#declare brakepct=0.91+0.05*(rand(RRR)-0.5)+(rand(RRR)-0.5)+(rand(RRR)-0.5)+
(rand(RRR)-0.5);
As you can see, the .05 only applies to the first term of your addition.
Your macro should read
#macro rdr()
((rand(RRR)-0.5)+(rand(RRR)-0.5)+(rand(RRR)-0.5)+(rand(RRR)-0.5))
#end
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
![](/i/fill.gif) |