Produces a random int x, min <= x <= max following a uniform distribution */
| 13 | following a uniform distribution |
| 14 | */ |
| 15 | int |
| 16 | randomInt(int min, int max) |
| 17 | { |
| 18 | return min + rand() % (max - min + 1); |
| 19 | } |
| 20 | |
| 21 | /* |
| 22 | Produces a random float x, min <= x <= max |