* Get a random value from the LCG. */
| 276 | * Get a random value from the LCG. |
| 277 | */ |
| 278 | static int16 Tools_RandomLCG(void) |
| 279 | { |
| 280 | /* Borland C/C++ 'a' and 'b' value, bits 30..16, as used by Dune2 */ |
| 281 | s_randomLCG = 0x015A4E35 * s_randomLCG + 1; |
| 282 | return (s_randomLCG >> 16) & 0x7FFF; |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Get a random value between the given values. |
no outgoing calls
no test coverage detected