...
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
int main() {
|
||||
set_random_seed(1842);
|
||||
uint32_t num = random_u32();
|
||||
printf("%u\n", num);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
printf("%u\n", random_u32());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,3 @@ uint32_t random_range(uint32_t max) {
|
||||
} while (r >= threshold);
|
||||
return r % max;
|
||||
}
|
||||
|
||||
void advance_state(uint32_t n) {
|
||||
for (uint32_t i = 0; i < n; i++) {
|
||||
random_u32();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,5 @@
|
||||
void set_random_seed(uint32_t seed);
|
||||
uint32_t random_u32(void);
|
||||
uint32_t random_range(uint32_t max);
|
||||
void advance_state(uint32_t n);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user