|
|
KRandomSequence ( long lngSeed = 1 ) |
Creates a pseudo-random sequence based on the seed lngSeed.
If lngSeed is 0, the sequence is initialized with a value from kapp->random().
A Pseudo-random sequence is different for each seed but can be reproduced by starting the sequence with the same seed.
If you need a single value which needs to be unpredictable, you need to use kapp->random() instead.
Parameters:
lngSeed | Seed to initialize the sequence with. |
void setSeed ( long lngSeed = 1 ) |
Restart the sequence based on lngSeed
double getDouble () |
Get the next number from the pseudo-random sequence
Returns: a psuedo-random double value between [0,1[
unsigned long getLong (unsigned long max) |
Get the next number from the pseudo-random sequence
Returns: a pseudo-random integer value between [0, max[ with 0 < max <= 1.000.000
Generated by: root@tantive.terraplex.com on Sun Feb 27 17:39:19 2000, using kdoc 2.0a33. |