NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/gl-matrix/docs/module-vec2.html
2023-09-14 14:47:11 +08:00

7870 lines
79 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: vec2</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">Module: vec2</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description">2 Dimensional Vector</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line3">line 3</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".add"><span class="type-signature">(static) </span>add<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Adds two vec2's
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line84">line 84</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".angle"><span class="type-signature">(static) </span>angle<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {Number}</span></h4>
<div class="description">
Get the angle between two 2D vectors
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line478">line 478</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
The angle in radians
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id=".ceil"><span class="type-signature">(static) </span>ceil<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Math.ceil the components of a vec2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to ceil</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line139">line 139</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".clone"><span class="type-signature">(static) </span>clone<span class="signature">(a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Creates a new vec2 initialized with values from an existing vector
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to clone</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line28">line 28</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a new 2D vector
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".copy"><span class="type-signature">(static) </span>copy<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Copy the values from one vec2 to another
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the source vector</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line56">line 56</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".create"><span class="type-signature">(static) </span>create<span class="signature">()</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Creates a new, empty vec2
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line13">line 13</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a new 2D vector
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".cross"><span class="type-signature">(static) </span>cross<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec3}</span></h4>
<div class="description">
Computes the cross product of two vec2's
Note that the cross product must by definition produce a 3D vector
</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>out</code></td>
<td class="type">
<span class="param-type">vec3</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line344">line 344</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec3</span>
</dd>
</dl>
<h4 class="name" id=".dist"><span class="type-signature">(static) </span>dist<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.distance
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line572">line 572</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".distance"><span class="type-signature">(static) </span>distance<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {Number}</span></h4>
<div class="description">
Calculates the euclidian distance between two vec2's
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line235">line 235</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
distance between a and b
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id=".div"><span class="type-signature">(static) </span>div<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.divide
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line566">line 566</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".divide"><span class="type-signature">(static) </span>divide<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Divides two vec2's
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line126">line 126</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".dot"><span class="type-signature">(static) </span>dot<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {Number}</span></h4>
<div class="description">
Calculates the dot product of two vec2's
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line331">line 331</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
dot product of a and b
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id=".equals"><span class="type-signature">(static) </span>equals<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
<div class="description">
Returns whether or not the vectors have approximately the same elements in the same position.
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The first vector.</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The second vector.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line537">line 537</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
True if the vectors are equal, false otherwise.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id=".exactEquals"><span class="type-signature">(static) </span>exactEquals<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>
<div class="description">
Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The first vector.</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The second vector.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line526">line 526</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
True if the vectors are equal, false otherwise.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Boolean</span>
</dd>
</dl>
<h4 class="name" id=".floor"><span class="type-signature">(static) </span>floor<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Math.floor the components of a vec2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to floor</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line152">line 152</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".forEach"><span class="type-signature">(static) </span>forEach<span class="signature">(a, stride, offset, count, fn, arg<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>
<div class="description">
Perform some operation over an array of vec2s.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="attributes">
</td>
<td class="description last">the array of vectors to iterate over</td>
</tr>
<tr>
<td class="name"><code>stride</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
</td>
<td class="description last">Number of elements between the start of each vec2. If 0 assumes tightly packed</td>
</tr>
<tr>
<td class="name"><code>offset</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
</td>
<td class="description last">Number of elements to skip at the beginning of the array</td>
</tr>
<tr>
<td class="name"><code>count</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
</td>
<td class="description last">Number of vec2s to iterate over. If 0 iterates over entire array</td>
</tr>
<tr>
<td class="name"><code>fn</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last">Function to call for each vector in the array</td>
</tr>
<tr>
<td class="name"><code>arg</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">additional argument to pass to fn</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line598">line 598</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
<h4 class="name" id=".fromValues"><span class="type-signature">(static) </span>fromValues<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Creates a new vec2 initialized with the given values
</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>x</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">X component</td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">Y component</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line42">line 42</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
a new 2D vector
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".inverse"><span class="type-signature">(static) </span>inverse<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Returns the inverse of the components of a vec2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to invert</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line298">line 298</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".len"><span class="type-signature">(static) </span>len<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.length
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line548">line 548</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".length"><span class="type-signature">(static) </span>length<span class="signature">(a)</span><span class="type-signature"> &rarr; {Number}</span></h4>
<div class="description">
Calculates the length of a vec2
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to calculate length of</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line260">line 260</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
length of a
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id=".lerp"><span class="type-signature">(static) </span>lerp<span class="signature">(out, a, b, t)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Performs a linear interpolation between two vec2's
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
<tr>
<td class="name"><code>t</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">interpolation amount, in the range [0-1], between the two inputs</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line360">line 360</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".max"><span class="type-signature">(static) </span>max<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Returns the maximum of two vec2's
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line180">line 180</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".min"><span class="type-signature">(static) </span>min<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Returns the minimum of two vec2's
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line166">line 166</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".mul"><span class="type-signature">(static) </span>mul<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.multiply
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line560">line 560</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".multiply"><span class="type-signature">(static) </span>multiply<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Multiplies two vec2's
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line112">line 112</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".negate"><span class="type-signature">(static) </span>negate<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Negates the components of a vec2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to negate</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line285">line 285</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".normalize"><span class="type-signature">(static) </span>normalize<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Normalize a vec2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to normalize</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line311">line 311</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".random"><span class="type-signature">(static) </span>random<span class="signature">(out, scale<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Generates a random vector with the given scale
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="attributes">
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last">Length of the resulting vector. If ommitted, a unit vector will be returned</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line375">line 375</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".rotate"><span class="type-signature">(static) </span>rotate<span class="signature">(out, a, b, c)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Rotate a 2D vector
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The receiving vec2</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The vec2 point to rotate</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">The origin of the rotation</td>
</tr>
<tr>
<td class="name"><code>c</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">The angle of rotation</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line458">line 458</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".round"><span class="type-signature">(static) </span>round<span class="signature">(out, a)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Math.round the components of a vec2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to round</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line193">line 193</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".scale"><span class="type-signature">(static) </span>scale<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Scales a vec2 by a scalar number
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the vector to scale</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">amount to scale the vector by</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line207">line 207</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".scaleAndAdd"><span class="type-signature">(static) </span>scaleAndAdd<span class="signature">(out, a, b, scale)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Adds two vec2's after scaling the second operand by a scalar value
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">the amount to scale b by before adding</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line222">line 222</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".set"><span class="type-signature">(static) </span>set<span class="signature">(out, x, y)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Set the components of a vec2 to the given values
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">X component</td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">Number</span>
</td>
<td class="description last">Y component</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line70">line 70</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".sqrDist"><span class="type-signature">(static) </span>sqrDist<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.squaredDistance
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line578">line 578</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".sqrLen"><span class="type-signature">(static) </span>sqrLen<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.squaredLength
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line584">line 584</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".squaredDistance"><span class="type-signature">(static) </span>squaredDistance<span class="signature">(a, b)</span><span class="type-signature"> &rarr; {Number}</span></h4>
<div class="description">
Calculates the squared euclidian distance between two vec2's
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line248">line 248</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
squared distance between a and b
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id=".squaredLength"><span class="type-signature">(static) </span>squaredLength<span class="signature">(a)</span><span class="type-signature"> &rarr; {Number}</span></h4>
<div class="description">
Calculates the squared length of a vec2
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to calculate squared length of</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line272">line 272</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
squared length of a
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Number</span>
</dd>
</dl>
<h4 class="name" id=".str"><span class="type-signature">(static) </span>str<span class="signature">(a)</span><span class="type-signature"> &rarr; {String}</span></h4>
<div class="description">
Returns a string representation of a vector
</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>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">vector to represent as a string</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line515">line 515</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
string representation of the vector
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">String</span>
</dd>
</dl>
<h4 class="name" id=".sub"><span class="type-signature">(static) </span>sub<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Alias for vec2.subtract
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line554">line 554</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".subtract"><span class="type-signature">(static) </span>subtract<span class="signature">(out, a, b)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Subtracts vector b from vector a
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the first operand</td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the second operand</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line98">line 98</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".transformMat2"><span class="type-signature">(static) </span>transformMat2<span class="signature">(out, a, m)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Transforms the vec2 with a mat2
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the vector to transform</td>
</tr>
<tr>
<td class="name"><code>m</code></td>
<td class="type">
<span class="param-type">mat2</span>
</td>
<td class="description last">matrix to transform with</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line391">line 391</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".transformMat2d"><span class="type-signature">(static) </span>transformMat2d<span class="signature">(out, a, m)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Transforms the vec2 with a mat2d
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the vector to transform</td>
</tr>
<tr>
<td class="name"><code>m</code></td>
<td class="type">
<span class="param-type">mat2d</span>
</td>
<td class="description last">matrix to transform with</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line407">line 407</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".transformMat3"><span class="type-signature">(static) </span>transformMat3<span class="signature">(out, a, m)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Transforms the vec2 with a mat3
3rd vector component is implicitly '1'
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the vector to transform</td>
</tr>
<tr>
<td class="name"><code>m</code></td>
<td class="type">
<span class="param-type">mat3</span>
</td>
<td class="description last">matrix to transform with</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line424">line 424</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
<h4 class="name" id=".transformMat4"><span class="type-signature">(static) </span>transformMat4<span class="signature">(out, a, m)</span><span class="type-signature"> &rarr; {vec2}</span></h4>
<div class="description">
Transforms the vec2 with a mat4
3rd vector component is implicitly '0'
4th vector component is implicitly '1'
</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>out</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the receiving vector</td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">vec2</span>
</td>
<td class="description last">the vector to transform</td>
</tr>
<tr>
<td class="name"><code>m</code></td>
<td class="type">
<span class="param-type">mat4</span>
</td>
<td class="description last">matrix to transform with</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="vec2.js.html">vec2.js</a>, <a href="vec2.js.html#line442">line 442</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
out
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">vec2</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-glMatrix.html">glMatrix</a></li><li><a href="module-mat2.html">mat2</a></li><li><a href="module-mat2d.html">mat2d</a></li><li><a href="module-mat3.html">mat3</a></li><li><a href="module-mat4.html">mat4</a></li><li><a href="module-quat.html">quat</a></li><li><a href="module-quat2.html">quat2</a></li><li><a href="module-vec2.html">vec2</a></li><li><a href="module-vec3.html">vec3</a></li><li><a href="module-vec4.html">vec4</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri Jul 13 2018 11:51:34 GMT+0200 (W. Europe Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>