Example of rand_seed() command

Post Reply
User avatar
NightRadio
Site Admin
Posts: 3941
Joined: Fri Jan 23, 2004 12:28 am
Location: Ekaterinburg. Russia
Contact:

Example of rand_seed() command

Post 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
brainmaster
Posts: 15
Joined: Thu Nov 22, 2007 1:32 pm
Location: The land of Colombian coffee

Re: Example of rand_seed() command

Post 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
:idea: BrainMaster :idea:
Post Reply