Important: The information in this document is obsolete and should not be used for new development.
SetRandomSeed
You can use theSetRandomSeedfunction to set the starting number for the random number generator algorithm.
void SetRandomSeed(const wide *seed);
seed- The pointer to the number to be used by the random number algorithm to generate random numbers.
DESCRIPTION
Random number generators are seeded with a value that is used by the algorithm to generate a random number. The seed is then used to generate the next random number.The
SetRandomSeedfunction allows you to select the seed used by the QuickDraw GX random number algorithm. IfSetRandomSeedis not used, QuickDraw GX will select a default seed of 0. This results in the same sequence of random numbers each timeRandomBitsis called.In order to obtain a different set of random numbers than those obtained using the default seed value or a previously set seed, use the
SetRandomSeedfunction.SEE ALSO
TheRandomBitsfunction uses the current seed to generate the next random number. TheRandomBitsfunction is described on page 8-58. TheGetRandomSeedfunction returns the current seed. TheGetRandomSeedfunction is described next.