diff options
Diffstat (limited to 'html/simple-shape/docs/Utils.html')
-rw-r--r-- | html/simple-shape/docs/Utils.html | 985 |
1 files changed, 985 insertions, 0 deletions
diff --git a/html/simple-shape/docs/Utils.html b/html/simple-shape/docs/Utils.html new file mode 100644 index 0000000..367387e --- /dev/null +++ b/html/simple-shape/docs/Utils.html @@ -0,0 +1,985 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>JSDoc: Namespace: Utils</title> + + <script src="scripts/prettify/prettify.js"> </script> + <script src="scripts/prettify/lang-css.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/jsdoc-default.css"> +</head> + +<body> + +<div id="main"> + + <h1 class="page-title">Namespace: Utils</h1> + + + + + + +<section> + +<header> + + <h2>Utils</h2> + + +</header> + +<article> + <div class="container-overview"> + + + <div class="description">Utility Functions Module +Pure functions for common operations</div> + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="app.js.html">app.js</a>, <a href="app.js.html#line37">line 37</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + </div> + + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + + <h4 class="name" id=".random"><span class="type-signature">(static) </span>random<span class="signature">(min, max)</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<div class="description"> + Generates a random number within a range +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<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">number</span> + + + + </td> + + + + + + <td class="description last">Minimum value</td> + </tr> + + + + <tr> + + <td class="name"><code>max</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last">Maximum value</td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="app.js.html">app.js</a>, <a href="app.js.html#line49">line 49</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id=".randomChoice"><span class="type-signature">(static) </span>randomChoice<span class="signature">(arr)</span><span class="type-signature"> → {*}</span></h4> + + + + + + +<div class="description"> + Randomly selects an item from an array +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>arr</code></td> + + + <td class="type"> + + +<span class="param-type">Array</span> + + + + </td> + + + + + + <td class="description last">Source array</td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="app.js.html">app.js</a>, <a href="app.js.html#line64">line 64</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">*</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id=".randomInt"><span class="type-signature">(static) </span>randomInt<span class="signature">(min, max)</span><span class="type-signature"> → {number}</span></h4> + + + + + + +<div class="description"> + Generates a random integer within a range +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<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">number</span> + + + + </td> + + + + + + <td class="description last">Minimum value</td> + </tr> + + + + <tr> + + <td class="name"><code>max</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last">Maximum value</td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="app.js.html">app.js</a>, <a href="app.js.html#line57">line 57</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">number</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id=".range"><span class="type-signature">(static) </span>range<span class="signature">(start, end)</span><span class="type-signature"> → {Array.<number>}</span></h4> + + + + + + +<div class="description"> + Creates a range array of numbers +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>start</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last">Start value</td> + </tr> + + + + <tr> + + <td class="name"><code>end</code></td> + + + <td class="type"> + + +<span class="param-type">number</span> + + + + </td> + + + + + + <td class="description last">End value</td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="app.js.html">app.js</a>, <a href="app.js.html#line79">line 79</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<number></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id=".shuffle"><span class="type-signature">(static) </span>shuffle<span class="signature">(arr)</span><span class="type-signature"> → {Array}</span></h4> + + + + + + +<div class="description"> + Fisher-Yates shuffle implementation +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>arr</code></td> + + + <td class="type"> + + +<span class="param-type">Array</span> + + + + </td> + + + + + + <td class="description last">Array to shuffle</td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="app.js.html">app.js</a>, <a href="app.js.html#line71">line 71</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + New shuffled array +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array</span> + + + </dd> +</dl> + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="ContextManager.html">ContextManager</a></li><li><a href="Layout.html">Layout</a></li><li><a href="Patterns.html">Patterns</a></li><li><a href="Shapes.html">Shapes</a></li><li><a href="Utils.html">Utils</a></li></ul><h3>Global</h3><ul><li><a href="global.html#CONFIG">CONFIG</a></li><li><a href="global.html#canvas">canvas</a></li></ul> +</nav> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.3</a> on Mon Feb 17 2025 15:13:39 GMT-0500 (Eastern Standard Time) +</footer> + +<script> prettyPrint(); </script> +<script src="scripts/linenumber.js"> </script> +</body> +</html> \ No newline at end of file |