aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a03302.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a03302.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'docs/doxygen/nel/a03302.html')
-rw-r--r--docs/doxygen/nel/a03302.html384
1 files changed, 384 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03302.html b/docs/doxygen/nel/a03302.html
new file mode 100644
index 00000000..f59c52f9
--- /dev/null
+++ b/docs/doxygen/nel/a03302.html
@@ -0,0 +1,384 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: NLMISC::CRandom class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLMISC::CRandom Class Reference</h1><code>#include &lt;<a class="el" href="a06312.html">random.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A simple, os-independant random generator. <dl compact><dt><b>Author:</b></dt><dd>Nicolas Vizerie <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00038">38</a> of file <a class="el" href="a06312.html">random.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>enum &nbsp;</td><td class="memItemRight" valign=bottom>{ <a class="el" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a> = 0x7fff
+ }</td></tr>
+
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma0">CRandom</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma1">frand</a> (double mod=1.0f)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma2">frandPlusMinus</a> (double mod=1.0)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma3">rand</a> (<a class="el" href="a04558.html#a9">uint16</a> mod)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma4">rand</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma5">randPlusMinus</a> (<a class="el" href="a04558.html#a9">uint16</a> mod)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandoma6">srand</a> (<a class="el" href="a04558.html#a10">sint32</a> seed)</td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a03302.html#NLMISC_1_1CRandomr0">_Seed</a></td></tr>
+
+</table>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CRandomw0" doxytag="NLMISC::CRandom::@81" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> anonymous enum
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b>Enumeration values: </b></dt><dd>
+<table border=0 cellspacing=2 cellpadding=0>
+<tr><td valign=top><em><a class="anchor" name="NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1" doxytag="RandMax" ></a>RandMax</em>&nbsp;</td><td>
+</td></tr>
+</table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00042">42</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+<div class="fragment"><pre>00042 { <a class="code" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a> = 0x7fff };
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CRandoma0" doxytag="NLMISC::CRandom::CRandom" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLMISC::CRandom::CRandom </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00064">64</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+<div class="fragment"><pre>00064 : <a class="code" href="a03302.html#NLMISC_1_1CRandomr0">_Seed</a>(1)
+00065 {
+00066 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CRandoma1" doxytag="NLMISC::CRandom::frand" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NLMISC::CRandom::frand </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">double&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mod</em> = 1.0f </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00090">90</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+References <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a06312.html#l00070">rand()</a>, and <a class="el" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a>.
+<p>
+Referenced by <a class="el" href="a06312.html#l00098">frandPlusMinus()</a>.
+<p>
+<div class="fragment"><pre>00091 {
+00092 <span class="keywordtype">double</span> <a class="code" href="a04223.html#a628">r</a> = (<span class="keywordtype">double</span>) <a class="code" href="a03302.html#NLMISC_1_1CRandoma4">rand</a>();
+00093 <a class="code" href="a04223.html#a628">r</a> /= (<span class="keywordtype">double</span>) <a class="code" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a>;
+00094 <span class="keywordflow">return</span> (<span class="keywordtype">float</span>)(<a class="code" href="a04223.html#a628">r</a> * mod);
+00095 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CRandoma2" doxytag="NLMISC::CRandom::frandPlusMinus" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> float NLMISC::CRandom::frandPlusMinus </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">double&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mod</em> = 1.0 </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00098">98</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+References <a class="el" href="a06312.html#l00090">frand()</a>.
+<p>
+<div class="fragment"><pre>00099 {
+00100 <span class="keywordflow">return</span> <a class="code" href="a03302.html#NLMISC_1_1CRandoma1">frand</a>(2*mod)-(<span class="keywordtype">float</span>)mod;
+00101 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CRandoma3" doxytag="NLMISC::CRandom::rand" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> NLMISC::CRandom::rand </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mod</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00076">76</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+References <a class="el" href="a06312.html#l00070">rand()</a>, <a class="el" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+<div class="fragment"><pre>00077 {
+00078 <a class="code" href="a04558.html#a10">sint32</a> m=mod;
+00079 <span class="keywordflow">return</span> <a class="code" href="a03302.html#NLMISC_1_1CRandoma4">rand</a>()*(m+1)/(<a class="code" href="a05167.html#a12">sint32</a>(RandMax)+1);
+00080 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CRandoma4" doxytag="NLMISC::CRandom::rand" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> NLMISC::CRandom::rand </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00070">70</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+References <a class="el" href="a06312.html#l00059">_Seed</a>, <a class="el" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a>, and <a class="el" href="a05981.html#l00099">sint32</a>.
+<p>
+Referenced by <a class="el" href="a06768.html#l03767">NL3D::CZoneLighter::attenuation()</a>, <a class="el" href="a06312.html#l00090">frand()</a>, <a class="el" href="a06312.html#l00076">rand()</a>, and <a class="el" href="a06312.html#l00083">randPlusMinus()</a>.
+<p>
+<div class="fragment"><pre>00071 {
+00072 <span class="keywordflow">return</span> ((<a class="code" href="a03302.html#NLMISC_1_1CRandomr0">_Seed</a> = <a class="code" href="a03302.html#NLMISC_1_1CRandomr0">_Seed</a> * 214013L + 2531011L) &gt;&gt; 16) &amp; <a class="code" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a>;
+00073 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CRandoma5" doxytag="NLMISC::CRandom::randPlusMinus" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> NLMISC::CRandom::randPlusMinus </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a9">uint16</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>mod</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00083">83</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+References <a class="el" href="a06312.html#l00070">rand()</a>, <a class="el" href="a03302.html#NLMISC_1_1CRandomw0NLMISC_1_1CRandomw1">RandMax</a>, <a class="el" href="a05981.html#l00099">sint32</a>, and <a class="el" href="a05981.html#l00098">uint16</a>.
+<p>
+<div class="fragment"><pre>00084 {
+00085 <a class="code" href="a04558.html#a10">sint32</a> m=mod;
+00086 <span class="keywordflow">return</span> m - <a class="code" href="a03302.html#NLMISC_1_1CRandoma4">rand</a>()*(2*m+1)/(<a class="code" href="a05167.html#a12">sint32</a>(RandMax)+1);
+00087 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLMISC_1_1CRandoma6" doxytag="NLMISC::CRandom::srand" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLMISC::CRandom::srand </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a10">sint32</a>&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>seed</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00104">104</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+References <a class="el" href="a06312.html#l00059">_Seed</a>, and <a class="el" href="a05981.html#l00099">sint32</a>.
+<p>
+<div class="fragment"><pre>00105 {
+00106 <a class="code" href="a03302.html#NLMISC_1_1CRandomr0">_Seed</a> = seed;
+00107 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLMISC_1_1CRandomr0" doxytag="NLMISC::CRandom::_Seed" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a10">sint32</a> <a class="el" href="a03302.html#NLMISC_1_1CRandomr0">NLMISC::CRandom::_Seed</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a06312.html#l00059">59</a> of file <a class="el" href="a06312.html">random.h</a>.
+<p>
+Referenced by <a class="el" href="a06312.html#l00070">rand()</a>, and <a class="el" href="a06312.html#l00104">srand()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="a06312.html">random.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:30:58 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>