diff options
author | Damien Doligez <damien.doligez-inria.fr> | 1997-03-31 15:51:43 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 1997-03-31 15:51:43 +0000 |
commit | cabc4322f104d34921de80c9379be85daa1fe186 (patch) | |
tree | 9547760547ccf22e40d14443c6807ae13c9022fa /stdlib/random.mli | |
parent | 08afd502700399f532abd7c16934b69bb2f77f74 (diff) | |
download | ocaml-cabc4322f104d34921de80c9379be85daa1fe186.tar.gz |
Meilleure verification de l'argument de Random.int
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1482 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/random.mli')
-rw-r--r-- | stdlib/random.mli | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/stdlib/random.mli b/stdlib/random.mli index 24a82fc1d4..ea53316f8d 100644 --- a/stdlib/random.mli +++ b/stdlib/random.mli @@ -22,9 +22,11 @@ val full_init : int array -> unit val bits : unit -> int (* Return 30 random bits in a nonnegative integer. *) val int : int -> int - (* [Random.int bound] returns a random number between 0 (inclusive) - and [bound] (exclusive). [bound] must be positive and smaller + (* [Random.int bound] returns a random integer between 0 (inclusive) + and [bound] (exclusive). [bound] must be more than 0 and less than $2^{30}$. *) val float : float -> float - (* [Random.float bound] returns a random number between 0 (inclusive) - and [bound] (exclusive). *) + (* [Random.float bound] returns a random floating-point number + between 0 (inclusive) and [bound] (exclusive). If [bound] is + negative, the result is negative. If [bound] is 0, the result + is 0. *) |