[an error occurred while processing this directive]
[<a href="index.shtml">Package Index</a></code> | <a href="index_std.shtml">Mudlib Index</a></code> | <a href="index_eff.shtml">Effect Index</a></code>]<br><h2>File /obj/handlers/random_num.c</h2>
Generate reproducible sequences of random numbers.
This is designed to produce a random number from the same
seed.  This will make sequences of reproduceable random
numbers.

Useful for things like garbling of text and stuff so the garble
always looks the same...
<h2>Method index</h2>
<ul>
<li><a href="#query_seed">query_seed</a>()<br/>
Returns the currently specified seed.
<li><a href="#random">random</a>(int, mixed)<br/>
Generate a random number.
<li><a href="#set_seed">set_seed</a>(int)<br/>
Set the seed for the generator.
</ul>
<h2>Public Functions</h2>
These are functions that everyone can access.<p>
<dl>
<dt class="autodocfuncname"><a name="query_seed">
query_seed</a><pre class="autodocfuncdef">
int query_seed()
</pre><dd><br />
Returns the currently specified seed.<br />
<br /><dl>
<dd><b>Returns:</b>
<br />the current seed
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="random">
random</a><pre class="autodocfuncdef">
varargs int random(int max,
                   mixed lseed)
</pre><dd><br />
Generate a random number.  If lseed is an int, it is used as the seed.
If lseed is a one-element array of ints, lseed[0] is used as the seed
and the new seed is passed back.  Otherwise, the previously set seed
is used.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
max - the maximum value for the number.<br />
lseed - the seed to use, either an int or a one-element array
of int.<br />
<br />
<dd><b>Returns:</b>
<br />a number from 0..max-1 (inclusive)
<br /><br />
<br /></dl>

<dt class="autodocfuncname"><a name="set_seed">
set_seed</a><pre class="autodocfuncdef">
void set_seed(int new_seed)
</pre><dd><br />
Set the seed for the generator.<br />
<br /><dl>
<dd><b>Parameters:</b><br />
new_seed - the seed to use.
<br />
<br />
<br /></dl>

</dl>
[an error occurred while processing this directive]

