|
|
Hi.
By the documentation, I understood that the seed function initializes a
stream of random numbers, which is independant with others.
Obviously, it is not true :
I have a scene in which I place objects randomly.
In my scene I first have declarations, then positionning.
So I have 3 seed() functions at the beginning of the code, and I use the
third one at the end. The problem : changing the number specified in the
seed function changes nothing. Using the debug function showed me that the
random numbers are strictly identical whatever seed I use.
Now if I move the seed statement and put it just before the rand function is
used, I have something completely different.
Conclusion : the seed/rand functions are intimately connected, and the use
of one stream visibly "corrupts" the others.
Can anyone tell me why I have not the same result when I put the seed in the
beginning of the code or just before using the stream ?
Post a reply to this message
|
|