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      span.virtual_style
22      {
23        font-size			 : 8pt;
24        color				 : white;
25        font-weight			: bold;
26        background			: #0a0;
27        border-left			: solid 1px #0f0;
28        border-top			: solid 1px #0f0;
29        border-right		: solid 1px #060;
30        border-bottom		: solid 1px #060;
31        padding-left		: 2px;
32        padding-right		: 2px;
33      }
34      span.protected_style
35      {
36        font-size			 : 8pt;
37        color				 : white;
38        font-weight			: bold;
39        background			: #444;
40        border-left			: solid 1px #ccc;
41        border-top			: solid 1px #ccc;
42        border-right		: solid 1px #222;
43        border-bottom		: solid 1px #222;
44        padding-left		: 2px;
45        padding-right		: 2px;
46      }
47        --></style>
48<title>nn::math::VEC2</title>
49  </head>
50  <body>
51<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/math/Overview.html">math</a>::VEC2</CODE> Structure</h1>
52<h2>Syntax</h2>
53    <div class="section">
54<pre class="definition">struct VEC2 : public nn::math::VEC2_</pre>
55    </div>
56<h2>Description</h2>
57    <div class="section">
58<p>A two-dimensional vector class.</p><!-- write here --></div>
59    <a name="typedef" id="typedef">
60<h2><CODE>typedef</CODE> Definitions</h2>
61      <div class="section">
62        <table class="members">
63          <tr>
64            <td width="100" />
65            <th>
66<a href="../../../nn/math/VEC2/self_type.html"><CODE>self_type</CODE></a>
67            </th>
68<td>This class's type.</td>
69          </tr>
70          <tr>
71            <td width="100" />
72            <th>
73<a href="../../../nn/math/VEC2/value_type.html"><CODE>value_type</CODE></a>
74            </th>
75<td>The type of this class's elements.</td>
76          </tr> </table>
77      </div>
78    </a> <a name="constant" id="constant">
79<h2>Member Constants</h2>
80      <div class="section">
81        <table class="members">
82          <tr>
83            <td width="100">
84<span class="static_style" title="static">S</span>
85            </td>
86            <th>
87<span class="argument"><a href="../../../nn/math/VEC2/DIMENSION.html"><CODE>DIMENSION</CODE></a></span>
88            </th>
89<td width="100">const int</td>
90<td>Number of dimensions.</td>
91          </tr> </table>
92      </div>
93    </a> <a name="function" id="function">
94<h2>Member Functions</h2>
95      <div class="section">
96        <table class="members">
97          <tr>
98<th class="category" colspan="3">Creation</th>
99          </tr>
100          <tr>
101            <td width="100">  </td>
102            <th>
103<a href="../../../nn/math/VEC2/VEC2.html"><CODE>VEC2</CODE></a>
104            </th>
105<td>Constructor.</td>
106          </tr>
107          <tr>
108<th class="category" colspan="3">Conversions</th>
109          </tr>
110          <tr>
111            <td width="100">  </td>
112            <th>
113<a href="../../../nn/math/VEC2/operator f32 -2a.html"><CODE>operator f32 *</CODE></a>
114            </th>
115<td>Casts to an <CODE>f32</CODE>-type value.</td>
116          </tr>
117          <tr>
118            <td width="100">  </td>
119            <th>
120<a href="../../../nn/math/VEC2/operator const f32 -2a.html"><CODE>operator const f32 *</CODE></a>
121            </th>
122<td>Casts to an <CODE>f32</CODE>-type value.</td>
123          </tr>
124          <tr>
125<th class="category" colspan="3">Operators</th>
126          </tr>
127          <tr>
128            <td width="100">  </td>
129            <th>
130<a href="../../../nn/math/VEC2/Lerp.html"><CODE>Lerp</CODE></a>
131            </th>
132<td>Linearly interpolates between two vectors and sets the result.</td>
133          </tr>
134          <tr>
135            <td width="100">  </td>
136            <th>
137<a href="../../../nn/math/VEC2/Dot.html"><CODE>Dot</CODE></a>
138            </th>
139<td>Calculates the dot product with the specified vector.</td>
140          </tr>
141          <tr>
142            <td width="100">  </td>
143            <th>
144<a href="../../../nn/math/VEC2/LenSq.html"><CODE>LenSq</CODE></a>
145            </th>
146<td>Calculates the square of a vector length.</td>
147          </tr>
148          <tr>
149            <td width="100">  </td>
150            <th>
151<a href="../../../nn/math/VEC2/LengthSquare.html"><CODE>LengthSquare</CODE></a>
152            </th>
153<td>Calculates the square of a vector length.</td>
154          </tr>
155          <tr>
156            <td width="100">  </td>
157            <th>
158<a href="../../../nn/math/VEC2/Length.html"><CODE>Length</CODE></a>
159            </th>
160<td>Calculates the vector length.</td>
161          </tr>
162          <tr>
163            <td width="100">  </td>
164            <th>
165<a href="../../../nn/math/VEC2/Normalize.html"><CODE>Normalize</CODE></a>
166            </th>
167<td>Normalizes a vector.</td>
168          </tr>
169          <tr>
170            <td width="100">  </td>
171            <th>
172<a href="../../../nn/math/VEC2/SafeNormalize.html"><CODE>SafeNormalize</CODE></a>
173            </th>
174<td>Normalizes a vector. If normalization fails, sets the specified vector.</td>
175          </tr>
176          <tr>
177            <td width="100">  </td>
178            <th>
179<a href="../../../nn/math/VEC2/DistanceSquare.html"><CODE>DistanceSquare</CODE></a>
180            </th>
181<td>Calculates the squared distance to the specified vector.</td>
182          </tr>
183          <tr>
184            <td width="100">  </td>
185            <th>
186<a href="../../../nn/math/VEC2/Maximize.html"><CODE>Maximize</CODE></a>
187            </th>
188<td>Creates the vector formed by the larger of each component of two input vectors.</td>
189          </tr>
190          <tr>
191            <td width="100">  </td>
192            <th>
193<a href="../../../nn/math/VEC2/Minimize.html"><CODE>Minimize</CODE></a>
194            </th>
195<td>Creates the vector formed by the smaller of each component of two input vectors.</td>
196          </tr>
197          <tr>
198<th class="category" colspan="3">Settings</th>
199          </tr>
200          <tr>
201            <td width="100">  </td>
202            <th>
203<a href="../../../nn/math/VEC2/Set.html"><CODE>Set</CODE></a>
204            </th>
205<td>Sets values individually.</td>
206          </tr>
207          <tr>
208<th class="category" colspan="3">Comparisons</th>
209          </tr>
210          <tr>
211            <td width="100">  </td>
212            <th>
213<a href="../../../nn/math/VEC2/operator==.html"><CODE>operator==</CODE></a>
214            </th>
215<td>Returns <CODE>true</CODE> if the values are equal.</td>
216          </tr>
217          <tr>
218            <td width="100">  </td>
219            <th>
220<a href="../../../nn/math/VEC2/operator!=.html"><CODE>operator!=</CODE></a>
221            </th>
222<td>Returns <CODE>true</CODE> if the values are equal.</td>
223          </tr>
224          <tr>
225            <td width="100">  </td>
226            <th>
227<a href="../../../nn/math/VEC2/IsZero.html"><CODE>IsZero</CODE></a>
228            </th>
229<td>Returns <CODE>true</CODE> if this is a zero vector.</td>
230          </tr>
231          <tr>
232<th class="category" colspan="3">Other</th>
233          </tr>
234          <tr>
235            <td width="100">
236<span class="static_style" title="static">S</span> </td>
237            <th>
238<a href="../../../nn/math/VEC2/Zero.html"><CODE>Zero</CODE></a>
239            </th>
240<td>All of the elements are vectors of <CODE>1</CODE>.</td>
241          </tr>
242          <tr>
243            <td width="100">  </td>
244            <th>
245<a href="../../../nn/math/VEC2/Report.html"><CODE>Report</CODE></a>
246            </th>
247<td>Outputs the state.</td>
248          </tr> </table>
249      </div>
250    </a>
251<h2>Inheritance Hierarchy</h2>
252    <div class="section">
253<p class="hierarchy"><span>nn::math::VEC2_</span><br />&nbsp;&nbsp;<b>nn::math::VEC2</b>
254      </p>
255    </div>
256<h2>Revision History</h2>
257    <div class="section">
258      <dl class="history">
259        <dt>2010/02/09</dt>
260<dd>Initial version.<br />
261        </dd>
262      </dl>
263    </div>
264  <hr><p>CONFIDENTIAL</p></body>
265</html>
266