Re: Separate threads of random numbers
- Posted by petelomax at blueyonder.co.uk Apr 07, 2002
- 420 views
On Sun, 7 Apr 2002 14:10:25 +0000, Andy Serpa <renegade at earthling.net> wrote: How about doing this: init(): set_rand(12345) seed[1]=rand(1073741823) -- use max range for thread seeds seed[2]=rand(1073741823) seed[3]=rand(1073741823) & function get_next_rand(integer thread, integer limit) integer result set_rand(seed[thread]) result=rand(limit) seed[thread]=rand(1073741823) return result Pete