Page 1 of 1

Example of rand_seed() command

Posted: Tue Nov 27, 2007 7:49 am
by NightRadio

Code: Select all

rand_seed( 0 ) //Start random generation from point 0
a1 = rand //move some random number to "a1"
rand_seed( 0 ) //Start random generation again from the same point
a2 = rand
//Now a1 is equal to a2
Example with equal random sequences:

Code: Select all

rand_seed( 0 )
a1 = rand
a2 = rand
a3 = rand
rand_seed( 0 )
b1 = rand
b2 = rand
b3 = rand
//Now a1 = b1, a2 = b2, a3 = b3

Re: Example of rand_seed() command

Posted: Tue Nov 27, 2007 1:06 pm
by brainmaster
Ok NightRadio, very understandably this example. Thanks a lot.

P.D. Maybe you might move the past post to it subforum.

Synapse for all