* This is a pseudo random number generator based on "man 3 rand". * It is not used properly because the seed is the argument and it * is increased by one between each call, but that should not matter * for this application. */
| 595 | * for this application. |
| 596 | */ |
| 597 | static unsigned get_prn(unsigned count) |
| 598 | { |
| 599 | count = count * 1103515245 + 12345; |
| 600 | return (count/65536) % PRN_MODULO; |
| 601 | } |
| 602 | |
| 603 | /* |
| 604 | * Custom integer square root from |