This file is indexed.

/usr/share/doc/libwfmath-doc/html/vector_8h_source.html is in libwfmath-doc 1.0.2+dfsg1-0.3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>WFMath: vector.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WFMath
   &#160;<span id="projectnumber">1.0.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3e8cadc20e0c5a8d56abb3b616a5245d.html">wfmath</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">vector.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// vector.h (Vector&lt;&gt; class definition)</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//  The WorldForge Project</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//  Copyright (C) 2001  The WorldForge Project</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">//  This program is free software; you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">//  it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">//  the Free Software Foundation; either version 2 of the License, or</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">//  (at your option) any later version.</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">//  This program is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">//  but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">//  GNU General Public License for more details.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">//  You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">//  along with this program; if not, write to the Free Software</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">//  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">//</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">//  For information about WorldForge and its authors, please contact</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">//  the Worldforge Web Site at http://www.worldforge.org.</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">// Author: Ron Steinke</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">// Created: 2001-12-7</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">// Extensive amounts of this material come from the Vector2D</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment">// and Vector3D classes from stage/math, written by Bryce W.</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment">// Harrington, Kosh, and Jari Sundell (Rakshasa).</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#ifndef WFMATH_VECTOR_H</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#define WFMATH_VECTOR_H</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;wfmath/const.h&gt;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &lt;iosfwd&gt;</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceWFMath.html">WFMath</a> {</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;Vector&lt;dim&gt;&amp; operator+=(Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;Vector&lt;dim&gt;&amp; operator-=(Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;Vector&lt;dim&gt;&amp; operator*=(Vector&lt;dim&gt;&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;Vector&lt;dim&gt;&amp; operator/=(Vector&lt;dim&gt;&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;Vector&lt;dim&gt; operator+(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;Vector&lt;dim&gt; operator-(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;Vector&lt;dim&gt; operator-(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v); <span class="comment">// Unary minus</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">operator*</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">operator*</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;Vector&lt;dim&gt; operator/(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> Dot(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> Angle(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; u);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment">// The following are defined in rotmatrix_funcs.h</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment"></span><span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt; <span class="comment">// m * v</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#a48ce116a2120805e20e5f1c8240a3460">Prod</a>(<span class="keyword">const</span> RotMatrix&lt;dim&gt;&amp; m, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt; <span class="comment">// m^-1 * v</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#a3e0619f7277d1c4a652a0d9b6e38bf0e">InvProd</a>(<span class="keyword">const</span> RotMatrix&lt;dim&gt;&amp; m, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt; <span class="comment">// v * m</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#a48ce116a2120805e20e5f1c8240a3460">Prod</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <span class="keyword">const</span> RotMatrix&lt;dim&gt;&amp; m);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt; <span class="comment">// v * m^-1</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#ac37d80d34e09f1f55f655aae7ea475a1">ProdInv</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <span class="keyword">const</span> RotMatrix&lt;dim&gt;&amp; m);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">operator*</a>(<span class="keyword">const</span> RotMatrix&lt;dim&gt;&amp; m, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;Vector&lt;dim&gt; <a class="code" href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">operator*</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <span class="keyword">const</span> RotMatrix&lt;dim&gt;&amp; m);</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;Vector&lt;dim&gt; operator-(<span class="keyword">const</span> Point&lt;dim&gt;&amp; c1, <span class="keyword">const</span> Point&lt;dim&gt;&amp; c2);</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;Point&lt;dim&gt; operator+(<span class="keyword">const</span> Point&lt;dim&gt;&amp; c, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;Point&lt;dim&gt; operator-(<span class="keyword">const</span> Point&lt;dim&gt;&amp; c, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;Point&lt;dim&gt; operator+(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v, <span class="keyword">const</span> Point&lt;dim&gt;&amp; c);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;Point&lt;dim&gt;&amp; operator+=(Point&lt;dim&gt;&amp; p, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;Point&lt;dim&gt;&amp; operator-=(Point&lt;dim&gt;&amp; p, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, const Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;std::istream&amp; operator&gt;&gt;(std::istream&amp; is, Vector&lt;dim&gt;&amp; v);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="keyword">template</span>&lt;<span class="keyword">typename</span> Shape&gt;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">class </span>ZeroPrimitive;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim = 3&gt;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="keyword">class </span>Vector {</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; <span class="keyword">friend</span> <span class="keyword">class </span>ZeroPrimitive&lt;<a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>&lt;dim&gt; &gt;;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">  125</a></span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>() : m_valid(false) {}</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>(<span class="keyword">const</span> AtlasInType&amp; a);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; point);</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a67964633ce60f71437d865f7fb537f0d">ZERO</a>();</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <span class="keyword">friend</span> std::ostream&amp; operator&lt;&lt; &lt;dim&gt;(std::ostream&amp; os, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v);</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <span class="keyword">friend</span> std::istream&amp; <span class="keyword">operator</span>&gt;&gt; &lt;dim&gt;(std::istream&amp; is, <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  AtlasOutType <a class="code" href="singletonWFMath_1_1Vector.html#a8947068eae086b53b80fe136dd10a305">toAtlas</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="singletonWFMath_1_1Vector.html#ae945787cd686e60b7e137ba5cf393489">fromAtlas</a>(<span class="keyword">const</span> AtlasInType&amp; a);</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v);</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;  <span class="keywordtype">bool</span> isEqualTo(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> epsilon = numeric_constants&lt;CoordType&gt;::epsilon()) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;  <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v)<span class="keyword"> const </span>{<span class="keywordflow">return</span> isEqualTo(v);}</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;  <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>&amp; v)<span class="keyword"> const </span>{<span class="keywordflow">return</span> !isEqualTo(v);}</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  <span class="keywordtype">bool</span> isValid()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_valid;}</div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a9a456bcb1358ef4a9bc8456a6b668d29">  154</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="singletonWFMath_1_1Vector.html#a9a456bcb1358ef4a9bc8456a6b668d29">setValid</a>(<span class="keywordtype">bool</span> valid = <span class="keyword">true</span>) {m_valid = valid;}</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a649f2804f47456dd19073362cd9114a6">zero</a>();</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;  <span class="comment">// Math operators</span></div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; <span class="keyword">operator</span>+=&lt;dim&gt;(<a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; v2);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector</a>&amp; <span class="keyword">operator</span>-=&lt;dim&gt;(Vector&amp; v1, <span class="keyword">const</span> Vector&amp; v2);</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;  <span class="keyword">friend</span> Vector&amp; <span class="keyword">operator</span>*=&lt;dim&gt;(Vector&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;  <span class="keyword">friend</span> Vector&amp; <span class="keyword">operator</span>/=&lt;dim&gt;(Vector&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>+&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v1, <span class="keyword">const</span> Vector&amp; v2);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>-&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v1, <span class="keyword">const</span> Vector&amp; v2);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>-&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v); <span class="comment">// Unary minus</span></div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;<span class="comment"></span>  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>*&lt;dim&gt;(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d, <span class="keyword">const</span> Vector&amp; v);</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>*&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>/&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d);</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <span class="comment">// documented outside the class definition</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  <span class="keyword">friend</span> Vector Prod&lt;dim&gt;(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1RotMatrix.html">RotMatrix&lt;dim&gt;</a>&amp; m, <span class="keyword">const</span> Vector&amp; v);</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;  <span class="keyword">friend</span> Vector InvProd&lt;dim&gt;(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1RotMatrix.html">RotMatrix&lt;dim&gt;</a>&amp; m, <span class="keyword">const</span> Vector&amp; v);</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#afadd2b353a13d6b6a60bf27a9bf3c6bc">  188</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#afadd2b353a13d6b6a60bf27a9bf3c6bc">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> i)<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_elem[i];}</div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a92b6f868fc77fa0b7d3ab902b927a43c">  190</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a92b6f868fc77fa0b7d3ab902b927a43c">operator[]</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> i)      {<span class="keywordflow">return</span> m_elem[i];}</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;  <span class="keyword">friend</span> Vector <span class="keyword">operator</span>-&lt;dim&gt;(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; c1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; c2);</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a> <span class="keyword">operator</span>+&lt;dim&gt;(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; c, <span class="keyword">const</span> Vector&amp; v);</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a> <span class="keyword">operator</span>-&lt;dim&gt;(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; c, <span class="keyword">const</span> Vector&amp; v);</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a> <span class="keyword">operator</span>+&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; c);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Point.html">Point&lt;dim&gt;</a>&amp; <span class="keyword">operator</span>+=&lt;dim&gt;(Point&lt;dim&gt;&amp; p, <span class="keyword">const</span> Vector&amp; rhs);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;  <span class="keyword">friend</span> Point&lt;dim&gt;&amp; <span class="keyword">operator</span>-=&lt;dim&gt;(Point&lt;dim&gt;&amp; p, <span class="keyword">const</span> Vector&amp; rhs);</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;  <span class="keyword">friend</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a475b29d811d95faa55fe06a3701d9e93">Cross</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;2&gt;</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;2&gt;</a>&amp; v2);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;  <span class="keyword">friend</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;3&gt;</a> <a class="code" href="singletonWFMath_1_1Vector.html#a475b29d811d95faa55fe06a3701d9e93">Cross</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;3&gt;</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;3&gt;</a>&amp; v2);</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;  <span class="keyword">friend</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> Dot&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v1, <span class="keyword">const</span> Vector&amp; v2);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  <span class="keyword">friend</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> Angle&lt;dim&gt;(<span class="keyword">const</span> Vector&amp; v, <span class="keyword">const</span> Vector&amp; u);</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a0ecbc49abf16c71a912bdeb5b239ca14">sqrMag</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a3d68c680b5ce33ed964dd28c2ebfb358">  217</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a3d68c680b5ce33ed964dd28c2ebfb358">mag</a>()<span class="keyword"> const         </span>{<span class="keywordflow">return</span> std::sqrt(<a class="code" href="singletonWFMath_1_1Vector.html#a0ecbc49abf16c71a912bdeb5b239ca14">sqrMag</a>());}</div>
<div class="line"><a name="l00219"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a0eb4fe8fcbed46a123fafeb6b9d6e36d">  219</a></span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a0eb4fe8fcbed46a123fafeb6b9d6e36d">normalize</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> norm = 1.0)</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;  {<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> themag = <a class="code" href="singletonWFMath_1_1Vector.html#a3d68c680b5ce33ed964dd28c2ebfb358">mag</a>(); <span class="keywordflow">return</span> (*<span class="keyword">this</span> *= norm / themag);}</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a8169b897f6896eba5e4378f0c883455b">sloppyMag</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a861e95931569a2406edb0a6102e07f8d">sloppyNorm</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> norm = 1.0);</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  <span class="comment">// Can&#39;t seem to implement these as constants, implementing</span></div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  <span class="comment">// inline lookup functions instead.</span></div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="comment"></span>  <span class="keyword">static</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a56cb6e59ee69beb55e9a7327a26df50b">sloppyMagMax</a>();</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  <span class="keyword">static</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a677954760a1f40dfe6e529c24a223f0b">sloppyMagMaxSqrt</a>();</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">rotate</a>(<span class="keywordtype">int</span> axis1, <span class="keywordtype">int</span> axis2, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">rotate</a>(<span class="keyword">const</span> Vector&amp; v1, <span class="keyword">const</span> Vector&amp; v2, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">rotate</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1RotMatrix.html">RotMatrix&lt;dim&gt;</a>&amp;);</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;  <span class="comment">// mirror image functions</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div>
<div class="line"><a name="l00271"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a2253896f1acfe08f5693c41e3296b3dd">  271</a></span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a2253896f1acfe08f5693c41e3296b3dd">mirror</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> i) { m_elem[i] *= -1; <span class="keywordflow">return</span> *<span class="keyword">this</span>;}</div>
<div class="line"><a name="l00273"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#abae1d18b6cdf19ad8a4a035814013295">  273</a></span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abae1d18b6cdf19ad8a4a035814013295">mirror</a>(<span class="keyword">const</span> Vector&amp; v)</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  {<span class="keywordflow">return</span> <a class="code" href="singletonWFMath_1_1Vector.html#a8acb4920dec5d1617c2179fa4644e55c">operator-=</a>(*<span class="keyword">this</span>, 2 * v * <a class="code" href="singletonWFMath_1_1Vector.html#aa1fb2e1d3e55d8422b8639291cb35bd7">Dot</a>(v, *<span class="keyword">this</span>) / v.sqrMag());}</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;</div>
<div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a5f36291a13c039eb478cae53a0f6ffc1">  279</a></span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a5f36291a13c039eb478cae53a0f6ffc1">mirror</a>()              {<span class="keywordflow">return</span> <a class="code" href="singletonWFMath_1_1Vector.html#aab42534581635e85a485b301028e32f9">operator*=</a>(*<span class="keyword">this</span>, -1);}</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;  <span class="comment">// Specialized 2D/3D stuff starts here</span></div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <span class="comment">// The following functions are defined only for</span></div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  <span class="comment">// two dimensional (rotate(CoordType), Vector&lt;&gt;(CoordType, CoordType))</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  <span class="comment">// and three dimensional (the rest of them) vectors.</span></div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  <span class="comment">// Attempting to call these on any other vector will</span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  <span class="comment">// result in a linker error.</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a87c3148c745515c76f1eb7ee86622cda">x</a>, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#abcc34cf449b7f17616b7cc7071b65f11">y</a>);</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">Vector</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a87c3148c745515c76f1eb7ee86622cda">x</a>, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#abcc34cf449b7f17616b7cc7071b65f11">y</a>, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">z</a>);</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">rotate</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a87bf279fe82aa5924c12681892a9c7db">rotateX</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a000b09ead89c89dc6297e30e36e5c4b5">rotateY</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a14bf65276970d896fcfa2af11f8a2871">rotateZ</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">rotate</a>(<span class="keyword">const</span> Vector&amp; axis, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">rotate</a>(<span class="keyword">const</span> <a class="code" href="classWFMath_1_1Quaternion.html">Quaternion</a>&amp; q);</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;  <span class="comment">// Label the first three components of the vector as (x,y,z) for</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  <span class="comment">// 2D/3D convienience</span></div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div>
<div class="line"><a name="l00313"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a87c3148c745515c76f1eb7ee86622cda">  313</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a87c3148c745515c76f1eb7ee86622cda">x</a>()<span class="keyword"> const   </span>{<span class="keywordflow">return</span> m_elem[0];}</div>
<div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a1354c90de87e4244331c311cc76efe92">  315</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a1354c90de87e4244331c311cc76efe92">x</a>()        {<span class="keywordflow">return</span> m_elem[0];}</div>
<div class="line"><a name="l00317"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#abcc34cf449b7f17616b7cc7071b65f11">  317</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#abcc34cf449b7f17616b7cc7071b65f11">y</a>()<span class="keyword"> const   </span>{<span class="keywordflow">return</span> m_elem[1];}</div>
<div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a60aaa444489d9f518106dbc1357b54e3">  319</a></span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a60aaa444489d9f518106dbc1357b54e3">y</a>()        {<span class="keywordflow">return</span> m_elem[1];}</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">z</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">z</a>();</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div>
<div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a8234075fddd6bd32da1e54df5e377d02">  326</a></span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a8234075fddd6bd32da1e54df5e377d02">mirrorX</a>()     {<span class="keywordflow">return</span> <a class="code" href="singletonWFMath_1_1Vector.html#a5f36291a13c039eb478cae53a0f6ffc1">mirror</a>(0);}</div>
<div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#af945c5cf4c5272cfa2732d779417ce0a">  328</a></span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#af945c5cf4c5272cfa2732d779417ce0a">mirrorY</a>()     {<span class="keywordflow">return</span> <a class="code" href="singletonWFMath_1_1Vector.html#a5f36291a13c039eb478cae53a0f6ffc1">mirror</a>(1);}</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a7c96a6927d5f86d8a32e6ef34c780d01">mirrorZ</a>();</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a0ee5d909aa1f832cdf1a1ca7d9a1515f">polar</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> r, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta);</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="singletonWFMath_1_1Vector.html#a55fbcf68bfc07a123a3b307254cd1d19">asPolar</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; r, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; theta) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a0ee5d909aa1f832cdf1a1ca7d9a1515f">polar</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> r, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">z</a>);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="singletonWFMath_1_1Vector.html#a55fbcf68bfc07a123a3b307254cd1d19">asPolar</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; r, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; theta, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">z</a>) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;  Vector&amp; <a class="code" href="singletonWFMath_1_1Vector.html#aa71fb7e588906d20153e62ea1e7ca895">spherical</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> r, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> theta, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> phi);</div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="singletonWFMath_1_1Vector.html#a57ad2d638a835f9f12b9e650848df87a">asSpherical</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; r, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; theta, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; phi) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  <span class="keyword">const</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>* elements()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_elem;}</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;  <span class="keywordtype">double</span> _scaleEpsilon(<span class="keyword">const</span> Vector&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> epsilon = numeric_constants&lt;CoordType&gt;::epsilon())<span class="keyword"> const</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="keyword">  </span>{<span class="keywordflow">return</span> _ScaleEpsilon(m_elem, v.m_elem, dim, epsilon);}</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> m_elem[dim];</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;  <span class="keywordtype">bool</span> m_valid;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;};</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">Vector&lt;3&gt;::z</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;  <span class="keywordflow">return</span> m_elem[2];</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;}</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a>&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">Vector&lt;3&gt;::z</a>()</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;{</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;  <span class="keywordflow">return</span> m_elem[2];</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;}</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;</div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;<span class="keyword">inline</span> Vector&lt;3&gt;&amp; <a class="code" href="singletonWFMath_1_1Vector.html#a7c96a6927d5f86d8a32e6ef34c780d01">Vector&lt;3&gt;::mirrorZ</a>()</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;{</div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;  <span class="keywordflow">return</span> mirror(2);</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;}</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="namespaceWFMath.html#a47336e0fcae85dfd45ea9d8dc28a7444">Cross</a>(<span class="keyword">const</span> Vector&lt;2&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;2&gt;&amp; v2);</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;Vector&lt;3&gt; <a class="code" href="namespaceWFMath.html#a47336e0fcae85dfd45ea9d8dc28a7444">Cross</a>(<span class="keyword">const</span> Vector&lt;3&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;3&gt;&amp; v2);</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;</div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">Parallel</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2, <span class="keywordtype">bool</span>&amp; same_dir);</div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;</div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">Parallel</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="keywordtype">bool</span> <a class="code" href="namespaceWFMath.html#ac66ecb657deedc45f55cc19e4ffdda0e">Perpendicular</a>(<span class="keyword">const</span> Vector&lt;dim&gt;&amp; v1, <span class="keyword">const</span> Vector&lt;dim&gt;&amp; v2);</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a06ca8cbab2b706b2a4e6b21ed24e0087">  400</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> operator+(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v2)</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;{</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> ans(v1);</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;  ans += v2;</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;  <span class="keywordflow">return</span> ans;</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;}</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a885f29c16d9844e1629e3f4c89cf5499">  410</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> operator-(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v2)</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;{</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> ans(v1);</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;  ans -= v2;</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;  <span class="keywordflow">return</span> ans;</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;}</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00420"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a5c8058d164bbe7ca5e2ae1fa5b7ad6ba">  420</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> <a class="code" href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">operator*</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d)</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;{</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> ans(v);</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;  ans *= d;</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;  <span class="keywordflow">return</span> ans;</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;}</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00430"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#a4c743650780ec35eb6ba53a76fa1a090">  430</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> <a class="code" href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">operator*</a>(<a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v)</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;{</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> ans(v);</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;  ans *= d;</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;  <span class="keywordflow">return</span> ans;</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;}</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;<span class="keyword">template</span> &lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00440"></a><span class="lineno"><a class="line" href="singletonWFMath_1_1Vector.html#afa980d9b7e68ebd26c85e95e077f5d2b">  440</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> operator/(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v, <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> d)</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;{</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;  <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a> ans(v);</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;  ans /= d;</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;  <span class="keywordflow">return</span> ans;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;}</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00450"></a><span class="lineno"><a class="line" href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">  450</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">Parallel</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v1,</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;                     <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v2,</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;                     <span class="keywordtype">bool</span>&amp; same_dir)</div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;{</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;  <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> dot = Dot(v1, v2);</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;  same_dir = (dot &gt; 0);</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespaceWFMath.html#a4add4b50f00b10c44cef3890f361311c">Equal</a>(dot * dot, v1.sqrMag() * v2.sqrMag());</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;}</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;<span class="keyword">template</span>&lt;<span class="keywordtype">int</span> dim&gt;</div>
<div class="line"><a name="l00462"></a><span class="lineno"><a class="line" href="namespaceWFMath.html#aacf580f399386a8f0a45c456bf36d1fa">  462</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">Parallel</a>(<span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v1, <span class="keyword">const</span> <a class="code" href="singletonWFMath_1_1Vector.html">Vector&lt;dim&gt;</a>&amp; v2)</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;{</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;  <span class="keywordtype">bool</span> same_dir;</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">Parallel</a>(v1, v2, same_dir);</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;}</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;</div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;<span class="keyword">inline</span> CoordType Vector&lt;1&gt;::sloppyMagMax()</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;{</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;  <span class="keywordflow">return</span> 1.f;</div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;}</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a56cb6e59ee69beb55e9a7327a26df50b">Vector&lt;2&gt;::sloppyMagMax</a>()</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;{</div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;  <span class="keywordflow">return</span> 1.082392200292393968799446410733f;</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;}</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a56cb6e59ee69beb55e9a7327a26df50b">Vector&lt;3&gt;::sloppyMagMax</a>()</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;{</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;  <span class="keywordflow">return</span> 1.145934719303161490541433900265f;</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;}</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> Vector&lt;1&gt;::sloppyMagMaxSqrt()</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;{</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;  <span class="keywordflow">return</span> 1.f;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;}</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a677954760a1f40dfe6e529c24a223f0b">Vector&lt;2&gt;::sloppyMagMaxSqrt</a>()</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;{</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;  <span class="keywordflow">return</span> 1.040380795811030899095785063701f;</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;}</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;<span class="keyword">template</span>&lt;&gt;</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;<span class="keyword">inline</span> <a class="code" href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">CoordType</a> <a class="code" href="singletonWFMath_1_1Vector.html#a677954760a1f40dfe6e529c24a223f0b">Vector&lt;3&gt;::sloppyMagMaxSqrt</a>()</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;{</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;  <span class="keywordflow">return</span> 1.070483404496847625250328653179f;</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;}</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;} <span class="comment">// namespace WFMath</span></div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;</div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;<span class="preprocessor">#endif // WFMATH_VECTOR_H</span></div>
<div class="ttc" id="namespaceWFMath_html_a4add4b50f00b10c44cef3890f361311c"><div class="ttname"><a href="namespaceWFMath.html#a4add4b50f00b10c44cef3890f361311c">WFMath::Equal</a></div><div class="ttdeci">bool Equal(const C &amp;c1, const C &amp;c2, CoordType epsilon=numeric_constants&lt; CoordType &gt;::epsilon())</div><div class="ttdoc">Test for equality up to precision epsilon. </div><div class="ttdef"><b>Definition:</b> const.h:158</div></div>
<div class="ttc" id="namespaceWFMath_html"><div class="ttname"><a href="namespaceWFMath.html">WFMath</a></div><div class="ttdoc">Generic library namespace. </div><div class="ttdef"><b>Definition:</b> atlasconv.h:45</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a8acb4920dec5d1617c2179fa4644e55c"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a8acb4920dec5d1617c2179fa4644e55c">WFMath::Vector::operator-=</a></div><div class="ttdeci">friend Vector &amp; operator-=(Vector &amp;v1, const Vector &amp;v2)</div><div class="ttdoc">Subtract the second vector from the first. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:108</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_aa1fb2e1d3e55d8422b8639291cb35bd7"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#aa1fb2e1d3e55d8422b8639291cb35bd7">WFMath::Vector::Dot</a></div><div class="ttdeci">friend CoordType Dot(const Vector &amp;v1, const Vector &amp;v2)</div><div class="ttdoc">The dot product of two vectors. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:223</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a2253896f1acfe08f5693c41e3296b3dd"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a2253896f1acfe08f5693c41e3296b3dd">WFMath::Vector::mirror</a></div><div class="ttdeci">Vector &amp; mirror(const int i)</div><div class="ttdoc">Reflect a vector in the direction of the i&#39;th axis. </div><div class="ttdef"><b>Definition:</b> vector.h:271</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a0eb4fe8fcbed46a123fafeb6b9d6e36d"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a0eb4fe8fcbed46a123fafeb6b9d6e36d">WFMath::Vector::normalize</a></div><div class="ttdeci">Vector &amp; normalize(CoordType norm=1.0)</div><div class="ttdoc">Normalize a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:219</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a92b6f868fc77fa0b7d3ab902b927a43c"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a92b6f868fc77fa0b7d3ab902b927a43c">WFMath::Vector::operator[]</a></div><div class="ttdeci">CoordType &amp; operator[](const int i)</div><div class="ttdoc">Get the i&#39;th element of the vector. </div><div class="ttdef"><b>Definition:</b> vector.h:190</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a56cb6e59ee69beb55e9a7327a26df50b"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a56cb6e59ee69beb55e9a7327a26df50b">WFMath::Vector::sloppyMagMax</a></div><div class="ttdeci">static CoordType sloppyMagMax()</div><div class="ttdoc">The maximum ratio of the return value of sloppyMag() to the true magnitude. </div></div>
<div class="ttc" id="singletonWFMath_1_1Point_html"><div class="ttname"><a href="singletonWFMath_1_1Point.html">WFMath::Point</a></div><div class="ttdoc">A dim dimensional point. </div><div class="ttdef"><b>Definition:</b> const.h:50</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a0ee5d909aa1f832cdf1a1ca7d9a1515f"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a0ee5d909aa1f832cdf1a1ca7d9a1515f">WFMath::Vector::polar</a></div><div class="ttdeci">Vector &amp; polar(CoordType r, CoordType theta)</div><div class="ttdoc">2D only: construct a vector from polar coordinates </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_ae945787cd686e60b7e137ba5cf393489"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#ae945787cd686e60b7e137ba5cf393489">WFMath::Vector::fromAtlas</a></div><div class="ttdeci">void fromAtlas(const AtlasInType &amp;a)</div><div class="ttdoc">Set the vector&#39;s value to that given by an Atlas object. </div><div class="ttdef"><b>Definition:</b> atlasconv.h:109</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a87c3148c745515c76f1eb7ee86622cda"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a87c3148c745515c76f1eb7ee86622cda">WFMath::Vector::x</a></div><div class="ttdeci">CoordType x() const </div><div class="ttdoc">Access the first component of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:313</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a475b29d811d95faa55fe06a3701d9e93"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a475b29d811d95faa55fe06a3701d9e93">WFMath::Vector::Cross</a></div><div class="ttdeci">friend CoordType Cross(const Vector&lt; 2 &gt; &amp;v1, const Vector&lt; 2 &gt; &amp;v2)</div><div class="ttdoc">2D only: get the z component of the cross product of two vectors </div></div>
<div class="ttc" id="namespaceWFMath_html_ac66ecb657deedc45f55cc19e4ffdda0e"><div class="ttname"><a href="namespaceWFMath.html#ac66ecb657deedc45f55cc19e4ffdda0e">WFMath::Perpendicular</a></div><div class="ttdeci">bool Perpendicular(const Vector&lt; dim &gt; &amp;v1, const Vector&lt; dim &gt; &amp;v2)</div><div class="ttdoc">Check if two vectors are perpendicular. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:250</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a9a456bcb1358ef4a9bc8456a6b668d29"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a9a456bcb1358ef4a9bc8456a6b668d29">WFMath::Vector::setValid</a></div><div class="ttdeci">void setValid(bool valid=true)</div><div class="ttdoc">make isValid() return true if you&#39;ve initialized the vector by hand </div><div class="ttdef"><b>Definition:</b> vector.h:154</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a000b09ead89c89dc6297e30e36e5c4b5"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a000b09ead89c89dc6297e30e36e5c4b5">WFMath::Vector::rotateY</a></div><div class="ttdeci">Vector &amp; rotateY(CoordType theta)</div><div class="ttdoc">3D only: rotate a vector about the y axis by an angle theta </div></div>
<div class="ttc" id="singletonWFMath_1_1RotMatrix_html"><div class="ttname"><a href="singletonWFMath_1_1RotMatrix.html">WFMath::RotMatrix</a></div><div class="ttdoc">A dim dimensional rotation matrix. Technically, a member of the group O(dim). </div><div class="ttdef"><b>Definition:</b> const.h:53</div></div>
<div class="ttc" id="namespaceWFMath_html_a3e0619f7277d1c4a652a0d9b6e38bf0e"><div class="ttname"><a href="namespaceWFMath.html#a3e0619f7277d1c4a652a0d9b6e38bf0e">WFMath::InvProd</a></div><div class="ttdeci">RotMatrix&lt; dim &gt; InvProd(const RotMatrix&lt; dim &gt; &amp;m1, const RotMatrix&lt; dim &gt; &amp;m2)</div><div class="ttdoc">returns m1^-1 * m2 </div><div class="ttdef"><b>Definition:</b> rotmatrix_funcs.h:133</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a5f36291a13c039eb478cae53a0f6ffc1"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a5f36291a13c039eb478cae53a0f6ffc1">WFMath::Vector::mirror</a></div><div class="ttdeci">Vector &amp; mirror()</div><div class="ttdoc">Reflect a vector in all directions simultaneously. </div><div class="ttdef"><b>Definition:</b> vector.h:279</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a14bf65276970d896fcfa2af11f8a2871"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a14bf65276970d896fcfa2af11f8a2871">WFMath::Vector::rotateZ</a></div><div class="ttdeci">Vector &amp; rotateZ(CoordType theta)</div><div class="ttdoc">3D only: rotate a vector about the z axis by an angle theta </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a8169b897f6896eba5e4378f0c883455b"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a8169b897f6896eba5e4378f0c883455b">WFMath::Vector::sloppyMag</a></div><div class="ttdeci">CoordType sloppyMag() const </div><div class="ttdoc">An approximation to the magnitude of a vector. </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a2c873374610941a14106c501d3a21892"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a2c873374610941a14106c501d3a21892">WFMath::Vector::z</a></div><div class="ttdeci">CoordType z() const </div><div class="ttdoc">Access the third component of a vector. </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a3d68c680b5ce33ed964dd28c2ebfb358"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a3d68c680b5ce33ed964dd28c2ebfb358">WFMath::Vector::mag</a></div><div class="ttdeci">CoordType mag() const </div><div class="ttdoc">The magnitude of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:217</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a649f2804f47456dd19073362cd9114a6"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a649f2804f47456dd19073362cd9114a6">WFMath::Vector::zero</a></div><div class="ttdeci">Vector &amp; zero()</div><div class="ttdoc">Zero the components of a vector. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:165</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a0ecbc49abf16c71a912bdeb5b239ca14"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a0ecbc49abf16c71a912bdeb5b239ca14">WFMath::Vector::sqrMag</a></div><div class="ttdeci">CoordType sqrMag() const </div><div class="ttdoc">The squared magnitude of a vector. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:237</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a8234075fddd6bd32da1e54df5e377d02"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a8234075fddd6bd32da1e54df5e377d02">WFMath::Vector::mirrorX</a></div><div class="ttdeci">Vector &amp; mirrorX()</div><div class="ttdoc">Flip the x component of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:326</div></div>
<div class="ttc" id="namespaceWFMath_html_a47336e0fcae85dfd45ea9d8dc28a7444"><div class="ttname"><a href="namespaceWFMath.html#a47336e0fcae85dfd45ea9d8dc28a7444">WFMath::Cross</a></div><div class="ttdeci">CoordType Cross(const Vector&lt; 2 &gt; &amp;v1, const Vector&lt; 2 &gt; &amp;v2)</div><div class="ttdoc">2D only: get the z component of the cross product of two vectors </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_abeec4ab40a9b5da0e7581731d258b915"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#abeec4ab40a9b5da0e7581731d258b915">WFMath::Vector::rotate</a></div><div class="ttdeci">Vector &amp; rotate(int axis1, int axis2, CoordType theta)</div><div class="ttdoc">Rotate the vector in the (axis1, axis2) plane by the angle theta. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:191</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a87bf279fe82aa5924c12681892a9c7db"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a87bf279fe82aa5924c12681892a9c7db">WFMath::Vector::rotateX</a></div><div class="ttdeci">Vector &amp; rotateX(CoordType theta)</div><div class="ttdoc">3D only: rotate a vector about the x axis by an angle theta </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a60aaa444489d9f518106dbc1357b54e3"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a60aaa444489d9f518106dbc1357b54e3">WFMath::Vector::y</a></div><div class="ttdeci">CoordType &amp; y()</div><div class="ttdoc">Access the second component of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:319</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_af945c5cf4c5272cfa2732d779417ce0a"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#af945c5cf4c5272cfa2732d779417ce0a">WFMath::Vector::mirrorY</a></div><div class="ttdeci">Vector &amp; mirrorY()</div><div class="ttdoc">Flip the y component of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:328</div></div>
<div class="ttc" id="namespaceWFMath_html_a81fd956241071755d20b985a8e647564"><div class="ttname"><a href="namespaceWFMath.html#a81fd956241071755d20b985a8e647564">WFMath::CoordType</a></div><div class="ttdeci">float CoordType</div><div class="ttdoc">Basic floating point type. </div><div class="ttdef"><b>Definition:</b> const.h:140</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a8947068eae086b53b80fe136dd10a305"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a8947068eae086b53b80fe136dd10a305">WFMath::Vector::toAtlas</a></div><div class="ttdeci">AtlasOutType toAtlas() const </div><div class="ttdoc">Create an Atlas object from the vector. </div><div class="ttdef"><b>Definition:</b> atlasconv.h:116</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a57ad2d638a835f9f12b9e650848df87a"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a57ad2d638a835f9f12b9e650848df87a">WFMath::Vector::asSpherical</a></div><div class="ttdeci">void asSpherical(CoordType &amp;r, CoordType &amp;theta, CoordType &amp;phi) const </div><div class="ttdoc">3D only: convert a vector to shperical coordinates </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_aab42534581635e85a485b301028e32f9"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#aab42534581635e85a485b301028e32f9">WFMath::Vector::operator*=</a></div><div class="ttdeci">friend Vector &amp; operator*=(Vector &amp;v, CoordType d)</div><div class="ttdoc">Multiply the magnitude of v by d. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:120</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a67964633ce60f71437d865f7fb537f0d"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a67964633ce60f71437d865f7fb537f0d">WFMath::Vector::ZERO</a></div><div class="ttdeci">static const Vector&lt; dim &gt; &amp; ZERO()</div><div class="ttdoc">Provides a global instance preset to zero. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:62</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a1354c90de87e4244331c311cc76efe92"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a1354c90de87e4244331c311cc76efe92">WFMath::Vector::x</a></div><div class="ttdeci">CoordType &amp; x()</div><div class="ttdoc">Access the first component of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:315</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html"><div class="ttname"><a href="singletonWFMath_1_1Vector.html">WFMath::Vector</a></div><div class="ttdoc">A dim dimensional vector. </div><div class="ttdef"><b>Definition:</b> const.h:55</div></div>
<div class="ttc" id="namespaceWFMath_html_ae265cf01c90eef4afb146a78685c3323"><div class="ttname"><a href="namespaceWFMath.html#ae265cf01c90eef4afb146a78685c3323">WFMath::operator*</a></div><div class="ttdeci">RotMatrix&lt; dim &gt; operator*(const RotMatrix&lt; dim &gt; &amp;m1, const RotMatrix&lt; dim &gt; &amp;m2)</div><div class="ttdoc">returns m1 * m2 </div><div class="ttdef"><b>Definition:</b> rotmatrix_funcs.h:223</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_aa71fb7e588906d20153e62ea1e7ca895"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#aa71fb7e588906d20153e62ea1e7ca895">WFMath::Vector::spherical</a></div><div class="ttdeci">Vector &amp; spherical(CoordType r, CoordType theta, CoordType phi)</div><div class="ttdoc">3D only: construct a vector from shperical coordinates </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a55fbcf68bfc07a123a3b307254cd1d19"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a55fbcf68bfc07a123a3b307254cd1d19">WFMath::Vector::asPolar</a></div><div class="ttdeci">void asPolar(CoordType &amp;r, CoordType &amp;theta) const </div><div class="ttdoc">2D only: convert a vector to polar coordinates </div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a677954760a1f40dfe6e529c24a223f0b"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a677954760a1f40dfe6e529c24a223f0b">WFMath::Vector::sloppyMagMaxSqrt</a></div><div class="ttdeci">static CoordType sloppyMagMaxSqrt()</div><div class="ttdoc">The square root of sloppyMagMax() </div></div>
<div class="ttc" id="namespaceWFMath_html_ac37d80d34e09f1f55f655aae7ea475a1"><div class="ttname"><a href="namespaceWFMath.html#ac37d80d34e09f1f55f655aae7ea475a1">WFMath::ProdInv</a></div><div class="ttdeci">RotMatrix&lt; dim &gt; ProdInv(const RotMatrix&lt; dim &gt; &amp;m1, const RotMatrix&lt; dim &gt; &amp;m2)</div><div class="ttdoc">returns m1 * m2^-1 </div><div class="ttdef"><b>Definition:</b> rotmatrix_funcs.h:111</div></div>
<div class="ttc" id="classWFMath_1_1Quaternion_html"><div class="ttname"><a href="classWFMath_1_1Quaternion.html">WFMath::Quaternion</a></div><div class="ttdoc">A normalized quaterion. </div><div class="ttdef"><b>Definition:</b> quaternion.h:35</div></div>
<div class="ttc" id="namespaceWFMath_html_a48ce116a2120805e20e5f1c8240a3460"><div class="ttname"><a href="namespaceWFMath.html#a48ce116a2120805e20e5f1c8240a3460">WFMath::Prod</a></div><div class="ttdeci">RotMatrix&lt; dim &gt; Prod(const RotMatrix&lt; dim &gt; &amp;m1, const RotMatrix&lt; dim &gt; &amp;m2)</div><div class="ttdoc">returns m1 * m2 </div><div class="ttdef"><b>Definition:</b> rotmatrix_funcs.h:89</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a4c95a0a7a6d9972c8f60399d239cf78f"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a4c95a0a7a6d9972c8f60399d239cf78f">WFMath::Vector::Vector</a></div><div class="ttdeci">Vector()</div><div class="ttdoc">Construct an uninitialized vector. </div><div class="ttdef"><b>Definition:</b> vector.h:125</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_afadd2b353a13d6b6a60bf27a9bf3c6bc"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#afadd2b353a13d6b6a60bf27a9bf3c6bc">WFMath::Vector::operator[]</a></div><div class="ttdeci">CoordType operator[](const int i) const </div><div class="ttdoc">Get the i&#39;th element of the vector. </div><div class="ttdef"><b>Definition:</b> vector.h:188</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a7c96a6927d5f86d8a32e6ef34c780d01"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a7c96a6927d5f86d8a32e6ef34c780d01">WFMath::Vector::mirrorZ</a></div><div class="ttdeci">Vector &amp; mirrorZ()</div><div class="ttdoc">Flip the z component of a vector. </div></div>
<div class="ttc" id="namespaceWFMath_html_a7ae06f5cbff78d44bbc9178f272f7fc6"><div class="ttname"><a href="namespaceWFMath.html#a7ae06f5cbff78d44bbc9178f272f7fc6">WFMath::Parallel</a></div><div class="ttdeci">bool Parallel(const Vector&lt; dim &gt; &amp;v1, const Vector&lt; dim &gt; &amp;v2, bool &amp;same_dir)</div><div class="ttdoc">Check if two vectors are parallel. </div><div class="ttdef"><b>Definition:</b> vector.h:450</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_abcc34cf449b7f17616b7cc7071b65f11"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#abcc34cf449b7f17616b7cc7071b65f11">WFMath::Vector::y</a></div><div class="ttdeci">CoordType y() const </div><div class="ttdoc">Access the second component of a vector. </div><div class="ttdef"><b>Definition:</b> vector.h:317</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_a861e95931569a2406edb0a6102e07f8d"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#a861e95931569a2406edb0a6102e07f8d">WFMath::Vector::sloppyNorm</a></div><div class="ttdeci">Vector &amp; sloppyNorm(CoordType norm=1.0)</div><div class="ttdoc">Approximately normalize a vector. </div><div class="ttdef"><b>Definition:</b> vector_funcs.h:155</div></div>
<div class="ttc" id="singletonWFMath_1_1Vector_html_abae1d18b6cdf19ad8a4a035814013295"><div class="ttname"><a href="singletonWFMath_1_1Vector.html#abae1d18b6cdf19ad8a4a035814013295">WFMath::Vector::mirror</a></div><div class="ttdeci">Vector &amp; mirror(const Vector &amp;v)</div><div class="ttdoc">Reflect a vector in the direction specified by v. </div><div class="ttdef"><b>Definition:</b> vector.h:273</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Nov 6 2014 21:07:21 for WFMath by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>