diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:29 -0800 |
commit | 8466d8cfa486fb30d1755c4261b781135083787b (patch) | |
tree | c8c12c67246f543c3cc4f64d1c07e003cb1d45ae /random.txi | |
parent | 87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff) | |
download | slib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz slib-8466d8cfa486fb30d1755c4261b781135083787b.zip |
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'random.txi')
-rw-r--r-- | random.txi | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -1,17 +1,23 @@ +@code{(require 'random)} +@ftindex random -@defun random n -@defunx random n state -Accepts a positive integer or real @var{n} and returns a number of the -same type between zero (inclusive) and @var{n} (exclusive). The values -returned by @code{random} are uniformly distributed from 0 to @var{n}. + +@defun random n state + + +@defunx random n + +@var{n} must be an exact positive integer. @code{random} returns an exact integer +between zero (inclusive) and @var{n} (exclusive). The values returned by +@code{random} are uniformly distributed from 0 to @var{n}. The optional argument @var{state} must be of the type returned by -@code{(seed->random-state)} or @code{(make-random-state)}. It defaults -to the value of the variable @code{*random-state*}. This object is used -to maintain the state of the pseudo-random-number generator and is -altered as a side effect of calls to @code{random}. +@code{(seed->random-state)} or @code{(make-random-state)}. It +defaults to the value of the variable @code{*random-state*}. This +object is used to maintain the state of the pseudo-random-number +generator and is altered as a side effect of calls to @code{random}. @end defun @defvar *random-state* Holds a data structure that encodes the internal state of the @@ -53,3 +59,5 @@ Scheme object; the first 50 characters of its printed representation will be used as the seed. Otherwise the value of @code{*random-state*} is used as the seed. @end defun + + |