1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
3  <head>
4    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5    <meta http-equiv="Content-Style-Type" content="text/css" />
6    <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" />
7    <style type="text/css"><!--
8      span.static_style
9      {
10        font-size			: 8pt;
11        color				: white;
12        font-weight			: bold;
13        background			: #44f;
14        border-left			: solid 1px #aaf;
15        border-top			: solid 1px #aaf;
16        border-right		: solid 1px #00c;
17        border-bottom		: solid 1px #00c;
18        padding-left		: 2px;
19        padding-right		: 2px;
20      }
21
22      span.virtual_style
23      {
24        font-size			 : 8pt;
25        color				 : white;
26        font-weight			: bold;
27        background			: #0a0;
28        border-left			: solid 1px #0f0;
29        border-top			: solid 1px #0f0;
30        border-right		: solid 1px #060;
31        border-bottom		: solid 1px #060;
32        padding-left		: 2px;
33        padding-right		: 2px;
34      }
35
36      span.protected_style
37      {
38        font-size			 : 8pt;
39        color				 : white;
40        font-weight			: bold;
41        background			: #444;
42        border-left			: solid 1px #ccc;
43        border-top			: solid 1px #ccc;
44        border-right		: solid 1px #222;
45        border-bottom		: solid 1px #222;
46        padding-left		: 2px;
47        padding-right		: 2px;
48      }
49        --></style>
50    <title>nn::math::VEC2</title>
51  </head>
52  <body>
53    <h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/math/Overview.html">math</a>::VEC2</CODE> Class</h1>
54    <h2>Syntax</h2>
55    <div class="section">
56      <pre class="definition">class VEC2 : public <a href="../../../nn/math/VEC2_/Overview.html">nn::math::VEC2_</a></pre>
57    </div>
58    <h2>Description</h2>
59    <div class="section">
60      <p>A two-dimensional vector class.</p><!-- write here --></div>
61    <a name="typedef" id="typedef">
62      <h2><CODE>typedef</CODE> Definitions</h2>
63      <div class="section">
64        <table class="members">
65          <tr>
66            <td width="100" />
67            <th>
68              <a href="../../../nn/math/VEC2/self_type.html"><CODE>self_type</CODE></a>
69            </th>
70            <td>This class's type.</td>
71          </tr>
72          <tr>
73            <td width="100" />
74            <th>
75              <a href="../../../nn/math/VEC2/value_type.html"><CODE>value_type</CODE></a>
76            </th>
77            <td>The type of this class's elements.</td>
78          </tr> </table>
79      </div>
80    </a> <a name="constant" id="constant">
81      <h2>Member Constants</h2>
82      <div class="section">
83        <table class="members">
84          <tr>
85            <td width="100">
86              <span class="static_style" title="static">S</span>
87            </td>
88            <th>
89              <span class="argument"><a href="../../../nn/math/VEC2/DIMENSION.html"><CODE>DIMENSION</CODE></a></span>
90            </th>
91            <td width="100">const int</td>
92            <td>Number of dimensions.</td>
93          </tr> </table>
94      </div>
95    </a> <a name="function" id="function">
96      <h2>Member Functions</h2>
97      <div class="section">
98        <table class="members">
99          <tr>
100            <th class="category" colspan="3">Creation</th>
101          </tr>
102          <tr>
103            <td width="100">  </td>
104            <th>
105              <a href="../../../nn/math/VEC2/VEC2.html"><CODE>VEC2</CODE></a>
106            </th>
107            <td>Constructor.</td>
108          </tr>
109          <tr>
110            <th class="category" colspan="3">Conversions</th>
111          </tr>
112          <tr>
113            <td width="100">  </td>
114            <th>
115              <a href="../../../nn/math/VEC2/operator f32 -2a.html"><CODE>operator f32 *</CODE></a>
116            </th>
117            <td>Casts to an <CODE>f32</CODE>-type value.</td>
118          </tr>
119          <tr>
120            <td width="100">  </td>
121            <th>
122              <a href="../../../nn/math/VEC2/operator const f32 -2a.html"><CODE>operator const f32 *</CODE></a>
123            </th>
124            <td>Casts to an <CODE>f32</CODE>-type value.</td>
125          </tr>
126          <tr>
127            <th class="category" colspan="3">Operators</th>
128          </tr>
129          <tr>
130            <td width="100">  </td>
131            <th>
132              <a href="../../../nn/math/VEC2/operator+=.html"><CODE>operator+=</CODE></a>
133            </th>
134<td>Assigns the values of the added vector.</td>
135          </tr>
136          <tr>
137            <td width="100">  </td>
138            <th>
139              <a href="../../../nn/math/VEC2/operator-2d=.html"><CODE>operator-=</CODE></a>
140            </th>
141<td>Assigns the values after vector subtraction.</td>
142          </tr>
143          <tr>
144            <td width="100">  </td>
145            <th>
146              <a href="../../../nn/math/VEC2/operator-2a=.html"><CODE>operator*=</CODE></a>
147            </th>
148<td>Assigns the values of the multiplied vector.</td>
149          </tr>
150          <tr>
151            <td width="100">  </td>
152            <th>
153              <a href="../../../nn/math/VEC2/operator-2f=.html"><CODE>operator/=</CODE></a>
154            </th>
155<td>Assigns the values after vector division.</td>
156          </tr>
157          <tr>
158            <td width="100">  </td>
159            <th>
160              <a href="../../../nn/math/VEC2/operator+.html"><CODE>operator+</CODE></a>
161            </th>
162<td>Returns its own vector.</td>
163          </tr>
164          <tr>
165            <td width="100">  </td>
166            <th>
167              <a href="../../../nn/math/VEC2/operator-2d.html"><CODE>operator-</CODE></a>
168            </th>
169<td>Returns the inverse of the vector.</td>
170          </tr>
171          <tr>
172            <td width="100">  </td>
173            <th>
174              <a href="../../../nn/math/VEC2/operator-2a.html"><CODE>operator *</CODE></a>
175            </th>
176<td>Returns the result of vector multiplication.</td>
177          </tr>
178          <tr>
179            <td width="100">  </td>
180            <th>
181              <a href="../../../nn/math/VEC2/operator-2f.html"><CODE>operator/</CODE></a>
182            </th>
183<td>Returns the result of vector division.</td>
184          </tr>
185          <tr>
186            <td width="100">  </td>
187            <th>
188              <a href="../../../nn/math/VEC2/Lerp.html"><CODE>Lerp</CODE></a>
189            </th>
190            <td>Linearly interpolates between two vectors and sets the result.</td>
191          </tr>
192          <tr>
193            <td width="100">  </td>
194            <th>
195              <a href="../../../nn/math/VEC2/Dot.html"><CODE>Dot</CODE></a>
196            </th>
197            <td>Calculates the dot product with the specified vector.</td>
198          </tr>
199          <tr>
200            <td width="100">  </td>
201            <th>
202              <a href="../../../nn/math/VEC2/LenSq.html"><CODE>LenSq</CODE></a>
203            </th>
204            <td>Calculates the square of a vector length.</td>
205          </tr>
206          <tr>
207            <td width="100">  </td>
208            <th>
209              <a href="../../../nn/math/VEC2/LengthSquare.html"><CODE>LengthSquare</CODE></a>
210            </th>
211            <td>Calculates the square of a vector length.</td>
212          </tr>
213          <tr>
214            <td width="100">  </td>
215            <th>
216              <a href="../../../nn/math/VEC2/Length.html"><CODE>Length</CODE></a>
217            </th>
218            <td>Calculates the vector length.</td>
219          </tr>
220          <tr>
221            <td width="100">  </td>
222            <th>
223              <a href="../../../nn/math/VEC2/Normalize.html"><CODE>Normalize</CODE></a>
224            </th>
225            <td>Normalizes a vector.</td>
226          </tr>
227          <tr>
228            <td width="100">  </td>
229            <th>
230              <a href="../../../nn/math/VEC2/SafeNormalize.html"><CODE>SafeNormalize</CODE></a>
231            </th>
232            <td>Normalizes a vector. If normalization fails, sets the specified vector.</td>
233          </tr>
234          <tr>
235            <td width="100">  </td>
236            <th>
237              <a href="../../../nn/math/VEC2/DistanceSquare.html"><CODE>DistanceSquare</CODE></a>
238            </th>
239            <td>Calculates the squared distance to the specified vector.</td>
240          </tr>
241          <tr>
242            <td width="100">  </td>
243            <th>
244              <a href="../../../nn/math/VEC2/Maximize.html"><CODE>Maximize</CODE></a>
245            </th>
246            <td>Creates the vector formed by the larger of each component of two input vectors.</td>
247          </tr>
248          <tr>
249            <td width="100">  </td>
250            <th>
251              <a href="../../../nn/math/VEC2/Minimize.html"><CODE>Minimize</CODE></a>
252            </th>
253            <td>Creates the vector formed by the smaller of each component of two input vectors.</td>
254          </tr>
255          <tr>
256            <th class="category" colspan="3">Settings</th>
257          </tr>
258          <tr>
259            <td width="100">  </td>
260            <th>
261              <a href="../../../nn/math/VEC2/Set.html"><CODE>Set</CODE></a>
262            </th>
263            <td>Sets values individually.</td>
264          </tr>
265          <tr>
266            <th class="category" colspan="3">Comparisons</th>
267          </tr>
268          <tr>
269            <td width="100">  </td>
270            <th>
271              <a href="../../../nn/math/VEC2/operator==.html"><CODE>operator==</CODE></a>
272            </th>
273            <td>Returns <CODE>true</CODE> if the values are equal.</td>
274          </tr>
275          <tr>
276            <td width="100">  </td>
277            <th>
278              <a href="../../../nn/math/VEC2/operator!=.html"><CODE>operator!=</CODE></a>
279            </th>
280            <td>Returns <CODE>TRUE</CODE> if the values are equal.</td>
281          </tr>
282          <tr>
283            <td width="100">  </td>
284            <th>
285              <a href="../../../nn/math/VEC2/IsZero.html"><CODE>IsZero</CODE></a>
286            </th>
287            <td>Returns <CODE>true</CODE> if this is a zero vector.</td>
288          </tr>
289          <tr>
290            <th class="category" colspan="3">Other</th>
291          </tr>
292          <tr>
293            <td width="100">
294              <span class="static_style" title="static">S</span> </td>
295            <th>
296              <a href="../../../nn/math/VEC2/Zero.html"><CODE>Zero</CODE></a>
297            </th>
298            <td>This is a zero vector.</td>
299          </tr>
300          <tr>
301            <td width="100">
302              <span class="static_style" title="static">S</span> </td>
303            <th>
304              <a href="../../../nn/math/VEC2/One.html">One</a>
305            </th>
306            <td>All of the elements are vectors of <CODE>1</CODE>.</td>
307          </tr>
308          <tr>
309            <td width="100">  </td>
310            <th>
311              <a href="../../../nn/math/VEC2/Report.html"><CODE>Report</CODE></a>
312            </th>
313            <td>Outputs the state.</td>
314          </tr> </table>
315      </div>
316    </a>
317    <h2>Class Hierarchy</h2>
318    <div class="section">
319      <p class="hierarchy"><CODE><a href="../../../nn/math/VEC2_/Overview.html">nn::math::VEC2_</a><br />&nbsp;&nbsp;<b>nn::math::VEC2</b></CODE>
320      </p>
321    </div>
322    <h2>Revision History</h2>
323    <div class="section">
324      <dl class="history">
325        <dt>2010/02/09</dt>
326        <dd>Initial version.<br />
327        </dd>
328      </dl>
329    </div>
330  <hr><p>CONFIDENTIAL</p></body>
331</html>