home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / random.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  494 b   |  14 lines  |  [TEXT/MPS ]

  1. (* Pseudo-random number generator *)
  2.  
  3. value init : int -> unit;;
  4.   (* Initialize the generator, using the argument as a seed.
  5.      The same seed will always yield the same sequence of numbers. *)
  6.  
  7. value int : int -> int
  8.   (* [random__int bound] returns a random number between 0 (inclusive)
  9.      and [bound] (exclusive).  [bound] must be smaller than $2^{30}$. *)
  10. and float : float -> float
  11.   (* [random__float] returns a random number between 0 (inclusive)
  12.      and [bound] (exclusive). *)
  13. ;;
  14.