| 88 | */ |
| 89 | |
| 90 | void init( const int NewSeed, biteopt_rng const arf = NULL, |
| 91 | void* const ardata = NULL ) |
| 92 | { |
| 93 | rf = arf; |
| 94 | rdata = ardata; |
| 95 | |
| 96 | BitsLeft = 0; |
| 97 | Seed = (uint64_t) NewSeed; |
| 98 | lcg = 0; |
| 99 | Hash = 0; |
| 100 | |
| 101 | // Skip first values to make PRNG "settle down". |
| 102 | |
| 103 | int i; |
| 104 | |
| 105 | for( i = 0; i < 5; i++ ) |
| 106 | { |
| 107 | advance(); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * @return Random number in the range [0; 1). |
nothing calls this directly
no outgoing calls
no test coverage detected