|
![](/i/fill.gif) |
clipka wrote:
>
> There's two answers to your question - a short one and a long one:
>
When possible I always go for the long version.
Now I understand. :-)
> Speaking of macros: As a matter of fact, if you need this idiom (using
> rand()-generated values in a isosurface-defining function) frequently, you can
> save some of the work by defining a Rand() macro as follows:
>
> #macro Rand(stream)
> #declare R = rand(stream);
> R
> #end
>
> As macros are *always* evaluated at compile-time, and #declare statements are
> valid everywhere, you could now place the call anywhere, even in a function
> definition, without creating ambiguities or "misbehaving" functions.
Useful. Thanks for the help
John
--
"Eppur si muove" - Galileo Galilei
Post a reply to this message
|
![](/i/fill.gif) |