DWORD LFSRSeedRand( DWORD dwSeed );
Seeds the LFSR random number generator invoked by the LFSRRand() function. The prior seed is returned.
None
Parameters |
Description |
wSeed |
The new 32-bit seed value to assign to the LFSR. |
The last seed in use. This can be saved and restored by a subsequent call to LFSRSeedRand() if you wish to use LFSRRand() in multiple contexts without disrupting the random number sequence from the alternative context. For example, if App 1 needs a given sequence of random numbers to perform a test, if you save and restore the seed in App 2, it is possible for App 2 to not disrupt the random number sequence provided to App 1, even if the number of times App 2 calls LFSRRand() varies.
None
Upon initial power up, the internal seed is initialized to 0x1. Using a dwSeed value of 0x0 will return the same sequence of random numbers as using the seed of 0x1.