changeset 2182 | d8cea77af505 |
parent 2084 | 59769591eb60 |
child 2207 | 75a29ac69c19 |
0:819a2ec6f70b | 1:317932c2ec83 |
---|---|
25 return seed; |
25 return seed; |
26 } |
26 } |
27 |
27 |
28 int urandom(int n) { |
28 int urandom(int n) { |
29 static int seed = _urandom_init(); |
29 static int seed = _urandom_init(); |
30 ignore_unused_variable_warning(seed); |
|
30 return (int)(rand() / (1.0 + RAND_MAX) * n); |
31 return (int)(rand() / (1.0 + RAND_MAX) * n); |
31 } |
32 } |
32 |
33 |
33 int main() { |
34 int main() { |
34 |
35 |