mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
638 lines
25 KiB
HTML
638 lines
25 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:08 CEST 2017 -->
|
|
<title>RandomXS128 (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="RandomXS128 (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/RandomXS128.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
libgdx API
|
|
<style>
|
|
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
|
|
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
|
|
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
|
|
.TableHeadingColor { background:#EEEEFF; }
|
|
a { text-decoration:none }
|
|
a:hover { text-decoration:underline }
|
|
a:link, a:visited { color:blue }
|
|
table { border:0px }
|
|
.TableRowColor td:first-child { border-left:1px solid black }
|
|
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
|
|
hr { border:0px; border-bottom:1px solid #333366; }
|
|
</style>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/math/RandomXS128.html" target="_top">Frames</a></li>
|
|
<li><a href="RandomXS128.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx.math</div>
|
|
<h2 title="Class RandomXS128" class="title">Class RandomXS128</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>java.util.Random</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.badlogic.gdx.math.RandomXS128</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd>java.io.Serializable</dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">RandomXS128</span>
|
|
extends java.util.Random</pre>
|
|
<div class="block">This class implements the xorshift128+ algorithm that is a very fast, top-quality 64-bit pseudo-random number generator. The
|
|
quality of this PRNG is much higher than <code>Random</code>'s, and its cycle length is 2<sup>128</sup> − 1, which
|
|
is more than enough for any single-thread application. More details and algorithms can be found <a
|
|
href="http://xorshift.di.unimi.it/">here</a>.
|
|
<p>
|
|
Instances of RandomXS128 are not thread-safe.</div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>Inferno, davebaol</dd>
|
|
<dt><span class="seeLabel">See Also:</span></dt>
|
|
<dd><a href="../../../../serialized-form.html#com.badlogic.gdx.math.RandomXS128">Serialized Form</a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#RandomXS128--">RandomXS128</a></span>()</code>
|
|
<div class="block">Creates a new random number generator.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#RandomXS128-long-">RandomXS128</a></span>(long seed)</code>
|
|
<div class="block">Creates a new random number generator using a single <code>long</code> seed.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#RandomXS128-long-long-">RandomXS128</a></span>(long seed0,
|
|
long seed1)</code>
|
|
<div class="block">Creates a new random number generator using two <code>long</code> seeds.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#getState-int-">getState</a></span>(int seed)</code>
|
|
<div class="block">Returns the internal seeds to allow state saving.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>protected int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#next-int-">next</a></span>(int bits)</code>
|
|
<div class="block">This protected method is final because, contrary to the superclass, it's not used anymore by the other methods.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextBoolean--">nextBoolean</a></span>()</code>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>boolean </code> value from this random number generator's sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextBytes-byte:A-">nextBytes</a></span>(byte[] bytes)</code>
|
|
<div class="block">Generates random bytes and places them into a user-supplied byte array.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>double</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextDouble--">nextDouble</a></span>()</code>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>double</code> value between 0.0 and 1.0 from this random number generator's
|
|
sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextFloat--">nextFloat</a></span>()</code>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>float</code> value between 0.0 and 1.0 from this random number generator's
|
|
sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextInt--">nextInt</a></span>()</code>
|
|
<div class="block">Returns the next pseudo-random, uniformly distributed <code>int</code> value from this random number generator's sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextInt-int-">nextInt</a></span>(int n)</code>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>int</code> value between 0 (inclusive) and the specified value (exclusive),
|
|
drawn from this random number generator's sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--">nextLong</a></span>()</code>
|
|
<div class="block">Returns the next pseudo-random, uniformly distributed <code>long</code> value from this random number generator's sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong-long-">nextLong</a></span>(long n)</code>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>long</code> value between 0 (inclusive) and the specified value (exclusive),
|
|
drawn from this random number generator's sequence.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#setSeed-long-">setSeed</a></span>(long seed)</code>
|
|
<div class="block">Sets the internal seed of this generator based on the given <code>long</code> value.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/math/RandomXS128.html#setState-long-long-">setState</a></span>(long seed0,
|
|
long seed1)</code>
|
|
<div class="block">Sets the internal state of this generator.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.util.Random">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.util.Random</h3>
|
|
<code>doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextGaussian</code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="RandomXS128--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>RandomXS128</h4>
|
|
<pre>public RandomXS128()</pre>
|
|
<div class="block">Creates a new random number generator. This constructor sets the seed of the random number generator to a value very likely
|
|
to be distinct from any other invocation of this constructor.
|
|
<p>
|
|
This implementation creates a <code>Random</code> instance to generate the initial seed.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="RandomXS128-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>RandomXS128</h4>
|
|
<pre>public RandomXS128(long seed)</pre>
|
|
<div class="block">Creates a new random number generator using a single <code>long</code> seed.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>seed</code> - the initial seed</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="RandomXS128-long-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>RandomXS128</h4>
|
|
<pre>public RandomXS128(long seed0,
|
|
long seed1)</pre>
|
|
<div class="block">Creates a new random number generator using two <code>long</code> seeds.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>seed0</code> - the first part of the initial seed</dd>
|
|
<dd><code>seed1</code> - the second part of the initial seed</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="nextLong--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextLong</h4>
|
|
<pre>public long nextLong()</pre>
|
|
<div class="block">Returns the next pseudo-random, uniformly distributed <code>long</code> value from this random number generator's sequence.
|
|
<p>
|
|
Subclasses should override this, as this is used by all other methods.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextLong</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="next-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>next</h4>
|
|
<pre>protected final int next(int bits)</pre>
|
|
<div class="block">This protected method is final because, contrary to the superclass, it's not used anymore by the other methods.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>next</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextInt--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextInt</h4>
|
|
<pre>public int nextInt()</pre>
|
|
<div class="block">Returns the next pseudo-random, uniformly distributed <code>int</code> value from this random number generator's sequence.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextInt</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextInt-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextInt</h4>
|
|
<pre>public int nextInt(int n)</pre>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>int</code> value between 0 (inclusive) and the specified value (exclusive),
|
|
drawn from this random number generator's sequence.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextInt</code> in class <code>java.util.Random</code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>n</code> - the positive bound on the random number to be returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the next pseudo-random <code>int</code> value between <code>0</code> (inclusive) and <code>n</code> (exclusive).</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextLong-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextLong</h4>
|
|
<pre>public long nextLong(long n)</pre>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>long</code> value between 0 (inclusive) and the specified value (exclusive),
|
|
drawn from this random number generator's sequence. The algorithm used to generate the value guarantees that the result is
|
|
uniform, provided that the sequence of 64-bit values produced by this generator is.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>n</code> - the positive bound on the random number to be returned.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the next pseudo-random <code>long</code> value between <code>0</code> (inclusive) and <code>n</code> (exclusive).</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextDouble--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextDouble</h4>
|
|
<pre>public double nextDouble()</pre>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>double</code> value between 0.0 and 1.0 from this random number generator's
|
|
sequence.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextDouble</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextFloat--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextFloat</h4>
|
|
<pre>public float nextFloat()</pre>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>float</code> value between 0.0 and 1.0 from this random number generator's
|
|
sequence.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextFloat</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextBoolean--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextBoolean</h4>
|
|
<pre>public boolean nextBoolean()</pre>
|
|
<div class="block">Returns a pseudo-random, uniformly distributed <code>boolean </code> value from this random number generator's sequence.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextBoolean</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="nextBytes-byte:A-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>nextBytes</h4>
|
|
<pre>public void nextBytes(byte[] bytes)</pre>
|
|
<div class="block">Generates random bytes and places them into a user-supplied byte array. The number of random bytes produced is equal to the
|
|
length of the byte array.
|
|
<p>
|
|
This implementation uses <a href="../../../../com/badlogic/gdx/math/RandomXS128.html#nextLong--"><code>nextLong()</code></a> internally.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>nextBytes</code> in class <code>java.util.Random</code></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setSeed-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setSeed</h4>
|
|
<pre>public void setSeed(long seed)</pre>
|
|
<div class="block">Sets the internal seed of this generator based on the given <code>long</code> value.
|
|
<p>
|
|
The given seed is passed twice through a hash function. This way, if the user passes a small value we avoid the short
|
|
irregular transient associated with states having a very small number of bits set.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
|
|
<dd><code>setSeed</code> in class <code>java.util.Random</code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>seed</code> - a nonzero seed for this generator (if zero, the generator will be seeded with <code>Long.MIN_VALUE</code>).</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="setState-long-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>setState</h4>
|
|
<pre>public void setState(long seed0,
|
|
long seed1)</pre>
|
|
<div class="block">Sets the internal state of this generator.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>seed0</code> - the first part of the internal state</dd>
|
|
<dd><code>seed1</code> - the second part of the internal state</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getState-int-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getState</h4>
|
|
<pre>public long getState(int seed)</pre>
|
|
<div class="block">Returns the internal seeds to allow state saving.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>seed</code> - must be 0 or 1, designating which of the 2 long seeds to return</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the internal seed that can be used in setState</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/RandomXS128.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/math/RandomXS128.html" target="_top">Frames</a></li>
|
|
<li><a href="RandomXS128.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|