UNPKG

atum

Version:

A Procedural Graph Based Javascript Library

2,515 lines (1,032 loc) 51.1 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Class: Rand</title> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <script src="scripts/jquery.min.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="styles/jaguar.css"> <script> var config = {"monospaceLinks":false,"cleverLinks":false,"default":{"outputSourceFiles":true}}; </script> </head> <body> <div id="wrap" class="clearfix"> <div class="navigation"> <h3 class="applicationName"><a href="index.html"></a></h3> <div class="search"> <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations"> </div> <ul class="list"> <li class="item" data-name="Center"> <span class="title"> <a href="Center.html">Center</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Center#add"><a href="Center.html#add">add</a></li> <li data-name="Center#cross"><a href="Center.html#cross">cross</a></li> <li data-name="Center#divide"><a href="Center.html#divide">divide</a></li> <li data-name="Center#dot"><a href="Center.html#dot">dot</a></li> <li data-name="Center#key"><a href="Center.html#key">key</a></li> <li data-name="Center#list"><a href="Center.html#list">list</a></li> <li data-name="Center#magnitude"><a href="Center.html#magnitude">magnitude</a></li> <li data-name="Center#multiply"><a href="Center.html#multiply">multiply</a></li> <li data-name="Center#normalize"><a href="Center.html#normalize">normalize</a></li> <li data-name="Center#perpendiculars"><a href="Center.html#perpendiculars">perpendiculars</a></li> <li data-name="Center#rotate"><a href="Center.html#rotate">rotate</a></li> <li data-name="Center#subtract"><a href="Center.html#subtract">subtract</a></li> <li data-name="Center#toString"><a href="Center.html#toString">toString</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Corner"> <span class="title"> <a href="Corner.html">Corner</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Corner#add"><a href="Corner.html#add">add</a></li> <li data-name="Corner#cross"><a href="Corner.html#cross">cross</a></li> <li data-name="Corner#divide"><a href="Corner.html#divide">divide</a></li> <li data-name="Corner#dot"><a href="Corner.html#dot">dot</a></li> <li data-name="Corner#key"><a href="Corner.html#key">key</a></li> <li data-name="Corner#list"><a href="Corner.html#list">list</a></li> <li data-name="Corner#magnitude"><a href="Corner.html#magnitude">magnitude</a></li> <li data-name="Corner#multiply"><a href="Corner.html#multiply">multiply</a></li> <li data-name="Corner#normalize"><a href="Corner.html#normalize">normalize</a></li> <li data-name="Corner#perpendiculars"><a href="Corner.html#perpendiculars">perpendiculars</a></li> <li data-name="Corner#rotate"><a href="Corner.html#rotate">rotate</a></li> <li data-name="Corner#subtract"><a href="Corner.html#subtract">subtract</a></li> <li data-name="Corner#toString"><a href="Corner.html#toString">toString</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Diagram"> <span class="title"> <a href="Diagram.html">Diagram</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Edge"> <span class="title"> <a href="Edge.html">Edge</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Line"> <span class="title"> <a href="Line.html">Line</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Map"> <span class="title"> <a href="Map.html">Map</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Map#generate"><a href="Map.html#generate">generate</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="PointDistribution"> <span class="title"> <a href="PointDistribution.html">PointDistribution</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="PointDistribution.exports.circular"><a href="PointDistribution.html#.exports.circular">exports.circular</a></li> <li data-name="PointDistribution.exports.hexagon"><a href="PointDistribution.html#.exports.hexagon">exports.hexagon</a></li> <li data-name="PointDistribution.exports.jitteredGrid"><a href="PointDistribution.html#.exports.jitteredGrid">exports.jitteredGrid</a></li> <li data-name="PointDistribution.exports.poisson"><a href="PointDistribution.html#.exports.poisson">exports.poisson</a></li> <li data-name="PointDistribution.exports.random"><a href="PointDistribution.html#.exports.random">exports.random</a></li> <li data-name="PointDistribution.exports.recursiveWang"><a href="PointDistribution.html#.exports.recursiveWang">exports.recursiveWang</a></li> <li data-name="PointDistribution.exports.square"><a href="PointDistribution.html#.exports.square">exports.square</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Polygon"> <span class="title"> <a href="Polygon.html">Polygon</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Polygon#centroid"><a href="Polygon.html#centroid">centroid</a></li> <li data-name="Polygon#inset"><a href="Polygon.html#inset">inset</a></li> <li data-name="Polygon#isConvex"><a href="Polygon.html#isConvex">isConvex</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Rand"> <span class="title"> <a href="Rand.html">Rand</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Rand.rand"><a href="Rand.html#.rand">rand</a></li> <li data-name="Rand.randHex"><a href="Rand.html#.randHex">randHex</a></li> <li data-name="Rand.randHexColor"><a href="Rand.html#.randHexColor">randHexColor</a></li> <li data-name="Rand.randInt"><a href="Rand.html#.randInt">randInt</a></li> <li data-name="Rand.randRange"><a href="Rand.html#.randRange">randRange</a></li> <li data-name="Rand.setSeed"><a href="Rand.html#.setSeed">setSeed</a></li> <li data-name="Rand.vector"><a href="Rand.html#.vector">vector</a></li> <li data-name="Rand#rand"><a href="Rand.html#rand">rand</a></li> <li data-name="Rand#randHex"><a href="Rand.html#randHex">randHex</a></li> <li data-name="Rand#randHexColor"><a href="Rand.html#randHexColor">randHexColor</a></li> <li data-name="Rand#randInt"><a href="Rand.html#randInt">randInt</a></li> <li data-name="Rand#randRange"><a href="Rand.html#randRange">randRange</a></li> <li data-name="Rand#setSeed"><a href="Rand.html#setSeed">setSeed</a></li> <li data-name="Rand#vector"><a href="Rand.html#vector">vector</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Rectangle"> <span class="title"> <a href="Rectangle.html">Rectangle</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Rectangle#centroid"><a href="Rectangle.html#centroid">centroid</a></li> <li data-name="Rectangle#inset"><a href="Rectangle.html#inset">inset</a></li> <li data-name="Rectangle#isConvex"><a href="Rectangle.html#isConvex">isConvex</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Redist"> <span class="title"> <a href="Redist.html">Redist</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Redist.exports.exp"><a href="Redist.html#.exports.exp">exports.exp</a></li> <li data-name="Redist.exports.identity"><a href="Redist.html#.exports.identity">exports.identity</a></li> <li data-name="Redist.exports.inverse"><a href="Redist.html#.exports.inverse">exports.inverse</a></li> <li data-name="Redist.exports.pow"><a href="Redist.html#.exports.pow">exports.pow</a></li> <li data-name="Redist.exports.step"><a href="Redist.html#.exports.step">exports.step</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Shape"> <span class="title"> <a href="Shape.html">Shape</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Triangle"> <span class="title"> <a href="Triangle.html">Triangle</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Triangle#centroid"><a href="Triangle.html#centroid">centroid</a></li> <li data-name="Triangle#inset"><a href="Triangle.html#inset">inset</a></li> <li data-name="Triangle#isConvex"><a href="Triangle.html#isConvex">isConvex</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="Vector"> <span class="title"> <a href="Vector.html">Vector</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> <span class="subtitle">Methods</span> <li data-name="Vector.add"><a href="Vector.html#.add">add</a></li> <li data-name="Vector.angle"><a href="Vector.html#.angle">angle</a></li> <li data-name="Vector.avg"><a href="Vector.html#.avg">avg</a></li> <li data-name="Vector.copy"><a href="Vector.html#.copy">copy</a></li> <li data-name="Vector.cross"><a href="Vector.html#.cross">cross</a></li> <li data-name="Vector.dist2"><a href="Vector.html#.dist2">dist2</a></li> <li data-name="Vector.distance"><a href="Vector.html#.distance">distance</a></li> <li data-name="Vector.distToSeg"><a href="Vector.html#.distToSeg">distToSeg</a></li> <li data-name="Vector.distToSegSquared"><a href="Vector.html#.distToSegSquared">distToSegSquared</a></li> <li data-name="Vector.dot"><a href="Vector.html#.dot">dot</a></li> <li data-name="Vector.down"><a href="Vector.html#.down">down</a></li> <li data-name="Vector.left"><a href="Vector.html#.left">left</a></li> <li data-name="Vector.midpoint"><a href="Vector.html#.midpoint">midpoint</a></li> <li data-name="Vector.proj"><a href="Vector.html#.proj">proj</a></li> <li data-name="Vector.right"><a href="Vector.html#.right">right</a></li> <li data-name="Vector.subtract"><a href="Vector.html#.subtract">subtract</a></li> <li data-name="Vector.up"><a href="Vector.html#.up">up</a></li> <li data-name="Vector.zero"><a href="Vector.html#.zero">zero</a></li> <li data-name="Vector#add"><a href="Vector.html#add">add</a></li> <li data-name="Vector#cross"><a href="Vector.html#cross">cross</a></li> <li data-name="Vector#divide"><a href="Vector.html#divide">divide</a></li> <li data-name="Vector#dot"><a href="Vector.html#dot">dot</a></li> <li data-name="Vector#key"><a href="Vector.html#key">key</a></li> <li data-name="Vector#list"><a href="Vector.html#list">list</a></li> <li data-name="Vector#magnitude"><a href="Vector.html#magnitude">magnitude</a></li> <li data-name="Vector#multiply"><a href="Vector.html#multiply">multiply</a></li> <li data-name="Vector#normalize"><a href="Vector.html#normalize">normalize</a></li> <li data-name="Vector#perpendiculars"><a href="Vector.html#perpendiculars">perpendiculars</a></li> <li data-name="Vector#rotate"><a href="Vector.html#rotate">rotate</a></li> <li data-name="Vector#subtract"><a href="Vector.html#subtract">subtract</a></li> <li data-name="Vector#toString"><a href="Vector.html#toString">toString</a></li> <li data-name="Vector#toString"><a href="Vector.html#toString">toString</a></li> </ul> <ul class="events itemMembers"> </ul> </li> <li class="item" data-name="module:Atum"> <span class="title"> <a href="module-Atum.html">module:Atum</a> </span> <ul class="members itemMembers"> </ul> <ul class="typedefs itemMembers"> </ul> <ul class="methods itemMembers"> </ul> <ul class="events itemMembers"> </ul> </li> </ul> </div> <div class="main"> <h1 class="page-title" data-filename="Rand.html">Class: Rand</h1> <section> <header> <h2> Rand </h2> </header> <article> <div class="container-overview"> <dt> <div class="nameContainer"> <h4 class="name" id="Rand"> new Rand<span class="signature">(<span class="optional">seed</span>)</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line7">line 7</a> </div> </div> </dt> <dd> <div class="description"> Wrapper library for David Bau's seeded random number generator which is a wrapper for the Math.rand() functionality. This library is implemented to fill out the functionality of the random capabilities as well as build on the capabilities existing in the framework currently. This class can be used on a global or local scale. </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>seed</code></td> <td class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> </td> <td class="default"> 0 </td> <td class="description last"> <span class="optional">optional</span> The seed to be applied to the local random number generator</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-see">See:</dt> <dd class="tag-see"> <ul> <li><a target="_blank" href="https://github.com/davidbau/seedrandom">https://github.com/davidbau/seedrandom</a></li> </ul> </dd> </dl> <h5>Examples</h5> <pre class="prettyprint"><code>Rand.seedRandom(0); // Set the global seed Rand.rand(); // Predictable based off seed</code></pre> <pre class="prettyprint"><code>var rng = new Rand(0); // Set the local rng seed rng.rand(); // Predictable based off seed Rand.rand(); // Unpredictable since global seed is not set</code></pre> </dd> </div> <h3 class="subsection-title">Methods</h3> <dl> <dt> <div class="nameContainer"> <h4 class="name" id=".rand"> <span class="type-signature static">static</span>Rand.rand<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{number}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line78">line 78</a> </div> </div> </dt> <dd> <div class="description"> Get a random number from 0 to 1. </div> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> number </td> <td class="description last">random number from 0 to 1</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id=".randHex"> <span class="type-signature static">static</span>Rand.randHex<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{hex}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line208">line 208</a> </div> </div> </dt> <dd> <div class="description"> Get the random hex value of a color represented in the hexidecimal format </div> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> hex </td> <td class="description last"></td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id=".randHexColor"> <span class="type-signature static">static</span>Rand.randHexColor<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{string}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line246">line 246</a> </div> </div> </dt> <dd> <div class="description"> Get a random hex color string represented in "#HEXSTR" format </div> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> string </td> <td class="description last"></td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id=".randInt"> <span class="type-signature static">static</span>Rand.randInt<span class="signature">(min, max)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{number}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line167">line 167</a> </div> </div> </dt> <dd> <div class="description"> Get a random int in a particular range (min and max inclusive) </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>min</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> <tr> <td class="name"><code>max</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> number </td> <td class="description last">Random float number from min (inclusive) to max (exclusive)</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id=".randRange"> <span class="type-signature static">static</span>Rand.randRange<span class="signature">(min, max)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{number}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line120">line 120</a> </div> </div> </dt> <dd> <div class="description"> Get a random float value in a particular range </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>min</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> <tr> <td class="name"><code>max</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> number </td> <td class="description last">Random float number from min (inclusive) to max (exclusive)</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id=".setSeed"> <span class="type-signature static">static</span>Rand.setSeed<span class="signature">(<span class="optional">seed</span>)</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line44">line 44</a> </div> </div> </dt> <dd> <div class="description"> Set the global seed for the seeded random number generator. After the seed has been set. The random numbers will be predictable and repeatable given the same input seed. If no seed is specified, then a random seed will be assigned to the random number generator using added system entropy. </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>seed</code></td> <td class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> </td> <td class="default"> 0 </td> <td class="description last"> <span class="optional">optional</span> The seed to be applied to the global random number generator</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id=".vector"> <span class="type-signature static">static</span>Rand.vector<span class="signature">(bbox)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Vector.html">Vector</a>}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line289">line 289</a> </div> </div> </dt> <dd> <div class="description"> Get a random vector in a bounding box </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>bbox</code></td> <td class="type"> <span class="param-type"><a href="Rectangle.html">Rectangle</a></span> </td> <td class="description last"> The bounding box of the random vector</td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> <a href="Vector.html">Vector</a> </td> <td class="description last">A random vector</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="rand"> rand<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{number}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line89">line 89</a> </div> </div> </dt> <dd> <div class="description"> Get a random number from 0 to 1. </div> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> number </td> <td class="description last">random number from 0 to 1</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="randHex"> randHex<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{hex}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line219">line 219</a> </div> </div> </dt> <dd> <div class="description"> Get the random hex value of a color represented in the hexidecimal format </div> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> hex </td> <td class="description last"></td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="randHexColor"> randHexColor<span class="signature">()</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{string}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line258">line 258</a> </div> </div> </dt> <dd> <div class="description"> Get a random hex color string represented in "#HEXSTR" format </div> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> string </td> <td class="description last"></td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="randInt"> randInt<span class="signature">(min, max)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{number}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line181">line 181</a> </div> </div> </dt> <dd> <div class="description"> Get a random int in a particular range (min and max inclusive) </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>min</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> <tr> <td class="name"><code>max</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> number </td> <td class="description last">Random float number from min (inclusive) to max (exclusive)</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="randRange"> randRange<span class="signature">(min, max)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{number}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line134">line 134</a> </div> </div> </dt> <dd> <div class="description"> Get a random float value in a particular range </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>min</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> <tr> <td class="name"><code>max</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="description last"> </td> </tr> </tbody> </table> <dl class="details"> </dl> <h5>Returns:</h5> <table class="params"> <thead> <tr> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="type"> number </td> <td class="description last">Random float number from min (inclusive) to max (exclusive)</td> </tr> </tbody> </table> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="setSeed"> setSeed<span class="signature">(<span class="optional">seed</span>)</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line63">line 63</a> </div> </div> </dt> <dd> <div class="description"> Set the seed for the seeded random number generator. After the seed has been set. The random numbers will be predictable and repeatable given the same input seed. If no seed is specified, then a random seed will be assigned to the random number generator using added system entropy. </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>seed</code></td> <td class="type"> <span class="param-type">number</span> | <span class="param-type">string</span> </td> <td class="default"> 0 </td> <td class="description last"> <span class="optional">optional</span> The seed to be applied to the RNG</td> </tr> </tbody> </table> <dl class="details"> </dl> </dd> <dt> <div class="nameContainer"> <h4 class="name" id="vector"> vector<span class="signature">(bbox)</span><span class="glyphicon glyphicon-circle-arrow-right"></span><span class="type-signature returnType">{<a href="Vector.html">Vector</a>}</span> </h4> <div class="tag-source"> <a href="utilities_Rand.js.html">utilities/Rand.js</a>, <a href="utilities_Rand.js.html#line301">line 301</a> </div> </div> </dt> <dd> <div class="description"> Get a random vector in a bounding box </div> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>bbox</code></td> <td class="type"> <span class="param-type"><a href="Rectangle.html">Rectangle</a></span> </td> <td class="description last"> The bounding box of the random vector</td> </tr> </tbody> </table> <dl class="details">