Example of rand_seed() command

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

Example of rand_seed() command

Post by NightRadio » Tue Nov 27, 2007 7:49 am

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

User avatar
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 » Tue Nov 27, 2007 1:06 pm

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