* Get a random number within a given range, with a preference to smaller * values. * @param limit Upper bound of the range (inclusive). * @return Random number between \c 0 and \a limit (inclusive). */
| 143 | * @return Random number between \c 0 and \a limit (inclusive). |
| 144 | */ |
| 145 | short Micropolis::getERandom(short limit) |
| 146 | { |
| 147 | short z = getRandom(limit); |
| 148 | short x = getRandom(limit); |
| 149 | |
| 150 | return min(z, x); |
| 151 | } |
| 152 | |
| 153 | |
| 154 | /** Initialize the random number generator with a 'random' seed. */ |