|
![](/i/fill.gif) |
Rune wrote in message <3a92cca8@news.povray.org>...
> I need a macro that outputs a random number between 0 and 1 when called. It
> should have two integers as input. The reason I can't just use rand() and
> seed() is that I need it to always output the same random number when the
> same input numbers are used.
>
> I need a macro like this: Rand (Int1, Int2)
>
> I don't know anything about random number generators myself, so some help
> would be much appreciated.
perhaps this will help you:
#macro Rand(I1,I2)
rand(seed(val(concat(str(I1,0,0),str(I2,0,0)))))
#end
ABX
Post a reply to this message
|
![](/i/fill.gif) |