Random Number Generator.
Random number generation function -
based on the linear congruential method as presented in Doug Cooper's book
Condensed Pascal, pp. 116-117.
Returns a random number between 0 and 1.
(defun randnum (/ modulus multiplier increment random)
(if (not seed)
(setq seed (getvar "DATE"))
(setq modulus 65536
seed (rem (+ (* multiplier seed) increment) modulus)
random (/ seed modulus)