summaryrefslogtreecommitdiffstats
path: root/random.txi
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:29 -0800
commit8466d8cfa486fb30d1755c4261b781135083787b (patch)
treec8c12c67246f543c3cc4f64d1c07e003cb1d45ae /random.txi
parent87b82b5822ca54228cfa6df29be3ad9d4bc47d16 (diff)
downloadslib-8466d8cfa486fb30d1755c4261b781135083787b.tar.gz
slib-8466d8cfa486fb30d1755c4261b781135083787b.zip
Import Upstream version 3a1upstream/3a1
Diffstat (limited to 'random.txi')
-rw-r--r--random.txi26
1 files changed, 17 insertions, 9 deletions
diff --git a/random.txi b/random.txi
index d9474f9..ba86c84 100644
--- a/random.txi
+++ b/random.txi
@@ -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
+
+