aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html')
-rw-r--r--src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html404
1 files changed, 404 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html b/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html
new file mode 100644
index 0000000..513699f
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/doc/html/vector2d_8h_source.html
@@ -0,0 +1,404 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<title>Irrlicht 3D Engine: vector2d.h Source File</title>
6
7<link href="tabs.css" rel="stylesheet" type="text/css"/>
8<link href="doxygen.css" rel="stylesheet" type="text/css" />
9<link href="navtree.css" rel="stylesheet" type="text/css"/>
10<script type="text/javascript" src="jquery.js"></script>
11<script type="text/javascript" src="resize.js"></script>
12<script type="text/javascript" src="navtree.js"></script>
13<script type="text/javascript">
14 $(document).ready(initResizable);
15</script>
16<link href="search/search.css" rel="stylesheet" type="text/css"/>
17<script type="text/javascript" src="search/search.js"></script>
18<script type="text/javascript">
19 $(document).ready(function() { searchBox.OnSelectItem(0); });
20</script>
21
22</head>
23<body>
24<div id="top"><!-- do not remove this div! -->
25
26
27<div id="titlearea">
28<table cellspacing="0" cellpadding="0">
29 <tbody>
30 <tr style="height: 56px;">
31
32 <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
33
34
35 <td style="padding-left: 0.5em;">
36 <div id="projectname">Irrlicht 3D Engine
37
38 </div>
39
40 </td>
41
42
43
44
45 <td> <div id="MSearchBox" class="MSearchBoxInactive">
46 <span class="left">
47 <img id="MSearchSelect" src="search/mag_sel.png"
48 onmouseover="return searchBox.OnSearchSelectShow()"
49 onmouseout="return searchBox.OnSearchSelectHide()"
50 alt=""/>
51 <input type="text" id="MSearchField" value="Search" accesskey="S"
52 onfocus="searchBox.OnSearchFieldFocus(true)"
53 onblur="searchBox.OnSearchFieldFocus(false)"
54 onkeyup="searchBox.OnSearchFieldChange(event)"/>
55 </span><span class="right">
56 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
57 </span>
58 </div>
59</td>
60
61
62 </tr>
63 </tbody>
64</table>
65</div>
66
67<!-- Generated by Doxygen 1.7.5.1 -->
68<script type="text/javascript">
69var searchBox = new SearchBox("searchBox", "search",false,'Search');
70</script>
71<script type="text/javascript" src="dynsections.js"></script>
72</div>
73<div id="side-nav" class="ui-resizable side-nav-resizable">
74 <div id="nav-tree">
75 <div id="nav-tree-contents">
76 </div>
77 </div>
78 <div id="splitbar" style="-moz-user-select:none;"
79 class="ui-resizable-handle">
80 </div>
81</div>
82<script type="text/javascript">
83 initNavTree('vector2d_8h.html','');
84</script>
85<div id="doc-content">
86<div class="header">
87 <div class="headertitle">
88<div class="title">vector2d.h</div> </div>
89</div>
90<div class="contents">
91<a href="vector2d_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2012 Nikolaus Gebhardt</span>
92<a name="l00002"></a>00002 <span class="comment">// This file is part of the &quot;Irrlicht Engine&quot;.</span>
93<a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span>
94<a name="l00004"></a>00004
95<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __IRR_POINT_2D_H_INCLUDED__</span>
96<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __IRR_POINT_2D_H_INCLUDED__</span>
97<a name="l00007"></a>00007 <span class="preprocessor"></span>
98<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="irr_math_8h.html">irrMath.h</a>&quot;</span>
99<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="dimension2d_8h.html">dimension2d.h</a>&quot;</span>
100<a name="l00010"></a>00010
101<a name="l00011"></a>00011 <span class="keyword">namespace </span>irr
102<a name="l00012"></a>00012 {
103<a name="l00013"></a>00013 <span class="keyword">namespace </span>core
104<a name="l00014"></a>00014 {
105<a name="l00015"></a>00015
106<a name="l00016"></a>00016
107<a name="l00018"></a>00018
108<a name="l00020"></a>00020 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt;
109<a name="l00021"></a><a class="code" href="classirr_1_1core_1_1vector2d.html">00021</a> <span class="keyword">class </span><a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d</a>
110<a name="l00022"></a>00022 {
111<a name="l00023"></a>00023 <span class="keyword">public</span>:
112<a name="l00025"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a72c37c85b812bdaee77a32857d12bb7f">00025</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a72c37c85b812bdaee77a32857d12bb7f" title="Default constructor (null vector)">vector2d</a>() : <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>(0), <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>(0) {}
113<a name="l00027"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#addeb85b77b2f8372609330c66ffe53b0">00027</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#addeb85b77b2f8372609330c66ffe53b0" title="Constructor with two different values.">vector2d</a>(T nx, T ny) : <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>(nx), <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>(ny) {}
114<a name="l00029"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a88a082b80dbf6b5c221e5086fbade7e5">00029</a> <span class="keyword">explicit</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a88a082b80dbf6b5c221e5086fbade7e5" title="Constructor with the same value for both members.">vector2d</a>(T n) : <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>(n), <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>(n) {}
115<a name="l00031"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a8ebd20ef37425d42120c13aabdf63298">00031</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a8ebd20ef37425d42120c13aabdf63298" title="Copy constructor.">vector2d</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) : <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>(other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>), <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>(other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>) {}
116<a name="l00032"></a>00032
117<a name="l00033"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ad394222b16dcdc23c416d57acbb367cb">00033</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#ad394222b16dcdc23c416d57acbb367cb">vector2d</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other) : <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>(other.Width), <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>(other.Height) {}
118<a name="l00034"></a>00034
119<a name="l00035"></a>00035 <span class="comment">// operators</span>
120<a name="l00036"></a>00036
121<a name="l00037"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ad3fec2fa4ab4a2c6e5705d67399ee84c">00037</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#ad3fec2fa4ab4a2c6e5705d67399ee84c">operator-</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(-<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, -<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>); }
122<a name="l00038"></a>00038
123<a name="l00039"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a26ed12896e0f2b596b90104a10afabe1">00039</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a26ed12896e0f2b596b90104a10afabe1">operator=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> = other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> = other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
124<a name="l00040"></a>00040
125<a name="l00041"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a0ee6c8bafead525cd415c84cf74012f2">00041</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a0ee6c8bafead525cd415c84cf74012f2">operator=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> = other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> = other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
126<a name="l00042"></a>00042
127<a name="l00043"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ad61d79f7e748f3b02eb57cc61c231a99">00043</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#ad61d79f7e748f3b02eb57cc61c231a99">operator+</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> + other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>); }
128<a name="l00044"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a03cea10fda9ab64ad0378ab78bcbb101">00044</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a03cea10fda9ab64ad0378ab78bcbb101">operator+</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> + other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>); }
129<a name="l00045"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a9562439453b7fe491e3f3310e6e36440">00045</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a9562439453b7fe491e3f3310e6e36440">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>+=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>+=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
130<a name="l00046"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a0f2a30be25c63b94cb64dc158af7d0ee">00046</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a0f2a30be25c63b94cb64dc158af7d0ee">operator+</a>(<span class="keyword">const</span> T v)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + v, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> + v); }
131<a name="l00047"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a3f2bf3a89761ccd3f63fd252e8627d06">00047</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a3f2bf3a89761ccd3f63fd252e8627d06">operator+=</a>(<span class="keyword">const</span> T v) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>+=v; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>+=v; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
132<a name="l00048"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#aa05c788c6e98643e285ceaa31da30e8d">00048</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa05c788c6e98643e285ceaa31da30e8d">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> += other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> += other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
133<a name="l00049"></a>00049
134<a name="l00050"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a12431c746cfdefb6f4c789a610fddbd1">00050</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a12431c746cfdefb6f4c789a610fddbd1">operator-</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>); }
135<a name="l00051"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#af1833e3ff96a4cf3005ceb322cfc62b1">00051</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#af1833e3ff96a4cf3005ceb322cfc62b1">operator-</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>); }
136<a name="l00052"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a557a9942c5592d176276e1af8e6da2a4">00052</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a557a9942c5592d176276e1af8e6da2a4">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>-=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>-=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
137<a name="l00053"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a95e234978a779d84135c123e4ecd0a06">00053</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a95e234978a779d84135c123e4ecd0a06">operator-</a>(<span class="keyword">const</span> T v)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> - v, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> - v); }
138<a name="l00054"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a7fbdd3a9627d4f7342c2f897b846c131">00054</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a7fbdd3a9627d4f7342c2f897b846c131">operator-=</a>(<span class="keyword">const</span> T v) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>-=v; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>-=v; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
139<a name="l00055"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a9b8112fbfaa7d1a1c07bc3b8fb82e6fa">00055</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a9b8112fbfaa7d1a1c07bc3b8fb82e6fa">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html" title="Specifies a 2 dimensional size.">dimension2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> -= other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a0399dcc023c19d381d1a192596107db4" title="Width of the dimension.">Width</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> -= other.<a class="code" href="classirr_1_1core_1_1dimension2d.html#a89b253523d31336c6b2a6a56dfd48a6b" title="Height of the dimension.">Height</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
140<a name="l00056"></a>00056
141<a name="l00057"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ad0267af40443b941680e89803710d296">00057</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#ad0267af40443b941680e89803710d296">operator*</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> * other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> * other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>); }
142<a name="l00058"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a2053cd0795a974e9531412967efcc605">00058</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a2053cd0795a974e9531412967efcc605">operator*=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
143<a name="l00059"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#afb6e3105c7a869e05042eedcbc31cc84">00059</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#afb6e3105c7a869e05042eedcbc31cc84">operator*</a>(<span class="keyword">const</span> T v)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> * v, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> * v); }
144<a name="l00060"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ac0935984d68c32a2f0cd7e74c53751a7">00060</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#ac0935984d68c32a2f0cd7e74c53751a7">operator*=</a>(<span class="keyword">const</span> T v) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*=v; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*=v; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
145<a name="l00061"></a>00061
146<a name="l00062"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a4eb3724d5c798fbbe326645829eadc11">00062</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a4eb3724d5c798fbbe326645829eadc11">operator/</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> / other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> / other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>); }
147<a name="l00063"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a2ee6a9455f42afd1f6208332557c7bf6">00063</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a2ee6a9455f42afd1f6208332557c7bf6">operator/=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>/=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>/=other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
148<a name="l00064"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a343b682b0b27782efecfcc4bc2b62162">00064</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a343b682b0b27782efecfcc4bc2b62162">operator/</a>(<span class="keyword">const</span> T v)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> / v, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> / v); }
149<a name="l00065"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a0a5115fdbc8023793d11ddfea27dd124">00065</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a0a5115fdbc8023793d11ddfea27dd124">operator/=</a>(<span class="keyword">const</span> T v) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>/=v; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>/=v; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
150<a name="l00066"></a>00066
151<a name="l00068"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a828609667abff67902f1de3c2718d9a9">00068</a> <span class="keywordtype">bool</span> operator&lt;=(const vector2d&lt;T&gt;&amp;other) <span class="keyword">const</span>
152<a name="l00069"></a>00069 {
153<a name="l00070"></a>00070 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&lt;other.X || <a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.X)) ||
154<a name="l00071"></a>00071 (<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.X) &amp;&amp; (<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>&lt;other.Y || <a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>, other.Y)));
155<a name="l00072"></a>00072 }
156<a name="l00073"></a>00073
157<a name="l00075"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a09446a47463a9b09c55f87c4ffa19841">00075</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a09446a47463a9b09c55f87c4ffa19841" title="sort in order X, Y. Equality with rounding tolerance.">operator&gt;=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp;other)<span class="keyword"> const</span>
158<a name="l00076"></a>00076 <span class="keyword"> </span>{
159<a name="l00077"></a>00077 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&gt;other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> || <a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>)) ||
160<a name="l00078"></a>00078 (<a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>) &amp;&amp; (<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>&gt;other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> || <a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>)));
161<a name="l00079"></a>00079 }
162<a name="l00080"></a>00080
163<a name="l00082"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ac777d6a0b25ed66e73d1b71f25fdbe48">00082</a> <span class="keywordtype">bool</span> operator&lt;(const vector2d&lt;T&gt;&amp;other) <span class="keyword">const</span>
164<a name="l00083"></a>00083 {
165<a name="l00084"></a>00084 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&lt;other.X &amp;&amp; !<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.X)) ||
166<a name="l00085"></a>00085 (<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.X) &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>&lt;other.Y &amp;&amp; !<a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>, other.Y));
167<a name="l00086"></a>00086 }
168<a name="l00087"></a>00087
169<a name="l00089"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a8cd8cc1a497e428e0318a5f698c8396b">00089</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a8cd8cc1a497e428e0318a5f698c8396b" title="sort in order X, Y. Difference must be above rounding tolerance.">operator&gt;</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp;other)<span class="keyword"> const</span>
170<a name="l00090"></a>00090 <span class="keyword"> </span>{
171<a name="l00091"></a>00091 <span class="keywordflow">return</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&gt;other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &amp;&amp; !<a class="code" href="namespaceirr_1_1core.html#abf9b9b140cc365908ea4c8c47451e4e3" title="returns if a equals b, taking possible rounding errors into account">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>)) ||
172<a name="l00092"></a>00092 (<a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>) &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>&gt;other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &amp;&amp; !<a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>));
173<a name="l00093"></a>00093 }
174<a name="l00094"></a>00094
175<a name="l00095"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a39d74f53f61d65876dc884be7ebe4420">00095</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a39d74f53f61d65876dc884be7ebe4420">operator==</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">equals</a>(other); }
176<a name="l00096"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a9270c2d9b665790235d17ecb94450554">00096</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a9270c2d9b665790235d17ecb94450554">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !<a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">equals</a>(other); }
177<a name="l00097"></a>00097
178<a name="l00098"></a>00098 <span class="comment">// functions</span>
179<a name="l00099"></a>00099
180<a name="l00101"></a>00101
181<a name="l00104"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8">00104</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">equals</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
182<a name="l00105"></a>00105 <span class="keyword"> </span>{
183<a name="l00106"></a>00106 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>) &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#adca6dbf0b73bbed483471137b8b13bd8" title="Checks if this vector equals the other one.">core::equals</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>, other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>);
184<a name="l00107"></a>00107 }
185<a name="l00108"></a>00108
186<a name="l00109"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ab689d358d5ffb2ebf547d4597d6dbb9d">00109</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <span class="keyword">set</span>(T nx, T ny) {<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>=nx; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>=ny; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
187<a name="l00110"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ada63a008c05eabc08b4974edc409e001">00110</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <span class="keyword">set</span>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; p) { <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>=p.X; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>=p.Y; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
188<a name="l00111"></a>00111
189<a name="l00113"></a>00113
190<a name="l00114"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ad4c3614d12e2517223349a31632007ed">00114</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#ad4c3614d12e2517223349a31632007ed" title="Gets the length of the vector.">getLength</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="namespaceirr_1_1core.html#af2f378cc34a19f5da6fe1d4961646d1d">core::squareroot</a>( <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> ); }
191<a name="l00115"></a>00115
192<a name="l00117"></a>00117
193<a name="l00119"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a50d7eaeed6caf2b99bf3cf86e084c362">00119</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#a50d7eaeed6caf2b99bf3cf86e084c362" title="Get the squared length of this vector.">getLengthSQ</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; }
194<a name="l00120"></a>00120
195<a name="l00122"></a>00122
196<a name="l00124"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a3899c231259a77c4aae6fec8ed72a6bc">00124</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#a3899c231259a77c4aae6fec8ed72a6bc" title="Get the dot product of this vector with another.">dotProduct</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
197<a name="l00125"></a>00125 <span class="keyword"> </span>{
198<a name="l00126"></a>00126 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>;
199<a name="l00127"></a>00127 }
200<a name="l00128"></a>00128
201<a name="l00130"></a>00130
202<a name="l00133"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ae8541afbe62fe3b01e18fb04130f6d9e">00133</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#ae8541afbe62fe3b01e18fb04130f6d9e" title="Gets distance from another point.">getDistanceFrom</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
203<a name="l00134"></a>00134 <span class="keyword"> </span>{
204<a name="l00135"></a>00135 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>).<a class="code" href="classirr_1_1core_1_1vector2d.html#ad4c3614d12e2517223349a31632007ed" title="Gets the length of the vector.">getLength</a>();
205<a name="l00136"></a>00136 }
206<a name="l00137"></a>00137
207<a name="l00139"></a>00139
208<a name="l00142"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a77262661ca3dcd6befea9bbc20bae4aa">00142</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#a77262661ca3dcd6befea9bbc20bae4aa" title="Returns squared distance from another point.">getDistanceFromSQ</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const</span>
209<a name="l00143"></a>00143 <span class="keyword"> </span>{
210<a name="l00144"></a>00144 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> - other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>, <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> - other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>).<a class="code" href="classirr_1_1core_1_1vector2d.html#a50d7eaeed6caf2b99bf3cf86e084c362" title="Get the squared length of this vector.">getLengthSQ</a>();
211<a name="l00145"></a>00145 }
212<a name="l00146"></a>00146
213<a name="l00148"></a>00148
214<a name="l00151"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ac9c77997f6594d79d5daa5f6bf690ed2">00151</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#ac9c77997f6594d79d5daa5f6bf690ed2" title="rotates the point anticlockwise around a center by an amount of degrees.">rotateBy</a>(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> degrees, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; center=<a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>())
215<a name="l00152"></a>00152 {
216<a name="l00153"></a>00153 degrees *= <a class="code" href="namespaceirr_1_1core.html#a8e21b5969c8292857f7c9c5dcfd61c35" title="64bit constant for converting from degrees to radians (formally known as GRAD_PI2)">DEGTORAD64</a>;
217<a name="l00154"></a>00154 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> cs = cos(degrees);
218<a name="l00155"></a>00155 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> sn = sin(degrees);
219<a name="l00156"></a>00156
220<a name="l00157"></a>00157 <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> -= center.X;
221<a name="l00158"></a>00158 <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> -= center.Y;
222<a name="l00159"></a>00159
223<a name="l00160"></a>00160 <span class="keyword">set</span>((T)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*cs - <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*sn), (T)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*sn + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*cs));
224<a name="l00161"></a>00161
225<a name="l00162"></a>00162 <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> += center.X;
226<a name="l00163"></a>00163 <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> += center.Y;
227<a name="l00164"></a>00164 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
228<a name="l00165"></a>00165 }
229<a name="l00166"></a>00166
230<a name="l00168"></a>00168
231<a name="l00170"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a5d5c360ed4c4fd28d4a42272634b8e55">00170</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a5d5c360ed4c4fd28d4a42272634b8e55" title="Normalize the vector.">normalize</a>()
232<a name="l00171"></a>00171 {
233<a name="l00172"></a>00172 <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> length = (<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a>)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>);
234<a name="l00173"></a>00173 <span class="keywordflow">if</span> ( length == 0 )
235<a name="l00174"></a>00174 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
236<a name="l00175"></a>00175 length = <a class="code" href="namespaceirr_1_1core.html#adaef309f12c2a3386e94610e24f2bfa7">core::reciprocal_squareroot</a> ( length );
237<a name="l00176"></a>00176 <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> = (T)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> * length);
238<a name="l00177"></a>00177 Y = (T)(Y * length);
239<a name="l00178"></a>00178 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
240<a name="l00179"></a>00179 }
241<a name="l00180"></a>00180
242<a name="l00182"></a>00182
243<a name="l00185"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#af1baa5b3cf7484262fd32cfbe6698655">00185</a> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#af1baa5b3cf7484262fd32cfbe6698655" title="Calculates the angle of this vector in degrees in the trigonometric sense.">getAngleTrig</a>()<span class="keyword"> const</span>
244<a name="l00186"></a>00186 <span class="keyword"> </span>{
245<a name="l00187"></a>00187 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> == 0)
246<a name="l00188"></a>00188 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &lt; 0 ? 180 : 0;
247<a name="l00189"></a>00189 <span class="keywordflow">else</span>
248<a name="l00190"></a>00190 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> == 0)
249<a name="l00191"></a>00191 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &lt; 0 ? 270 : 90;
250<a name="l00192"></a>00192
251<a name="l00193"></a>00193 <span class="keywordflow">if</span> ( <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &gt; 0)
252<a name="l00194"></a>00194 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &gt; 0)
253<a name="l00195"></a>00195 <span class="keywordflow">return</span> atan((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>/(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>;
254<a name="l00196"></a>00196 <span class="keywordflow">else</span>
255<a name="l00197"></a>00197 <span class="keywordflow">return</span> 180.0-atan((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>/-(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)X) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>;
256<a name="l00198"></a>00198 <span class="keywordflow">else</span>
257<a name="l00199"></a>00199 <span class="keywordflow">if</span> (X &gt; 0)
258<a name="l00200"></a>00200 <span class="keywordflow">return</span> 360.0-atan(-(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>/(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)X) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>;
259<a name="l00201"></a>00201 <span class="keywordflow">else</span>
260<a name="l00202"></a>00202 <span class="keywordflow">return</span> 180.0+atan(-(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>/-(<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">irr::f64</a>)X) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>;
261<a name="l00203"></a>00203 }
262<a name="l00204"></a>00204
263<a name="l00206"></a>00206
264<a name="l00208"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#ab75f18492cd0dac6dd0936e1ac65dc86">00208</a> <span class="keyword">inline</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#ab75f18492cd0dac6dd0936e1ac65dc86" title="Calculates the angle of this vector in degrees in the counter trigonometric sense.">getAngle</a>()<span class="keyword"> const</span>
265<a name="l00209"></a>00209 <span class="keyword"> </span>{
266<a name="l00210"></a>00210 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> == 0) <span class="comment">// corrected thanks to a suggestion by Jox</span>
267<a name="l00211"></a>00211 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &lt; 0 ? 180 : 0;
268<a name="l00212"></a>00212 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> == 0)
269<a name="l00213"></a>00213 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &lt; 0 ? 90 : 270;
270<a name="l00214"></a>00214
271<a name="l00215"></a>00215 <span class="comment">// don&#39;t use getLength here to avoid precision loss with s32 vectors</span>
272<a name="l00216"></a>00216 <span class="comment">// avoid floating-point trouble as sqrt(y*y) is occasionally larger than y, so clamp</span>
273<a name="l00217"></a>00217 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> tmp = <a class="code" href="namespaceirr_1_1core.html#a6162f685b68f629e77336081d3316969" title="clamps a value between low and high">core::clamp</a>(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> / sqrt((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>)), -1.0, 1.0);
274<a name="l00218"></a>00218 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> angle = atan( <a class="code" href="namespaceirr_1_1core.html#af2f378cc34a19f5da6fe1d4961646d1d">core::squareroot</a>(1 - tmp*tmp) / tmp) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>;
275<a name="l00219"></a>00219
276<a name="l00220"></a>00220 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&gt;0 &amp;&amp; Y&gt;0)
277<a name="l00221"></a>00221 <span class="keywordflow">return</span> angle + 270;
278<a name="l00222"></a>00222 <span class="keywordflow">else</span>
279<a name="l00223"></a>00223 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&gt;0 &amp;&amp; Y&lt;0)
280<a name="l00224"></a>00224 <span class="keywordflow">return</span> angle + 90;
281<a name="l00225"></a>00225 <span class="keywordflow">else</span>
282<a name="l00226"></a>00226 <span class="keywordflow">if</span> (<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>&lt;0 &amp;&amp; Y&lt;0)
283<a name="l00227"></a>00227 <span class="keywordflow">return</span> 90 - angle;
284<a name="l00228"></a>00228 <span class="keywordflow">else</span>
285<a name="l00229"></a>00229 <span class="keywordflow">if</span> (X&lt;0 &amp;&amp; Y&gt;0)
286<a name="l00230"></a>00230 <span class="keywordflow">return</span> 270 - angle;
287<a name="l00231"></a>00231
288<a name="l00232"></a>00232 <span class="keywordflow">return</span> angle;
289<a name="l00233"></a>00233 }
290<a name="l00234"></a>00234
291<a name="l00236"></a>00236
292<a name="l00238"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a581ab3975900d5af8d4c7517738beba2">00238</a> <span class="keyword">inline</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a581ab3975900d5af8d4c7517738beba2" title="Calculates the angle between this vector and another one in degree.">getAngleWith</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; b)<span class="keyword"> const</span>
293<a name="l00239"></a>00239 <span class="keyword"> </span>{
294<a name="l00240"></a>00240 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> tmp = (<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*b.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*b.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>);
295<a name="l00241"></a>00241
296<a name="l00242"></a>00242 <span class="keywordflow">if</span> (tmp == 0.0)
297<a name="l00243"></a>00243 <span class="keywordflow">return</span> 90.0;
298<a name="l00244"></a>00244
299<a name="l00245"></a>00245 tmp = tmp / <a class="code" href="namespaceirr_1_1core.html#af2f378cc34a19f5da6fe1d4961646d1d">core::squareroot</a>((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)((<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>) * (b.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*b.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + b.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*b.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>)));
300<a name="l00246"></a>00246 <span class="keywordflow">if</span> (tmp &lt; 0.0)
301<a name="l00247"></a>00247 tmp = -tmp;
302<a name="l00248"></a>00248 <span class="keywordflow">if</span> ( tmp &gt; 1.0 ) <span class="comment">// avoid floating-point trouble</span>
303<a name="l00249"></a>00249 tmp = 1.0;
304<a name="l00250"></a>00250
305<a name="l00251"></a>00251 <span class="keywordflow">return</span> atan(sqrt(1 - tmp*tmp) / tmp) * <a class="code" href="namespaceirr_1_1core.html#ae7afeb48af12f5f5130cd179a644ec58" title="64bit constant for converting from radians to degrees">RADTODEG64</a>;
306<a name="l00252"></a>00252 }
307<a name="l00253"></a>00253
308<a name="l00255"></a>00255
309<a name="l00259"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#adc8bba9dfd48218d083dcbe88bf98da0">00259</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1vector2d.html#adc8bba9dfd48218d083dcbe88bf98da0" title="Returns if this vector interpreted as a point is on a line between two other points.">isBetweenPoints</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; begin, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; end)<span class="keyword"> const</span>
310<a name="l00260"></a>00260 <span class="keyword"> </span>{
311<a name="l00261"></a>00261 <span class="keywordflow">if</span> (begin.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> != end.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>)
312<a name="l00262"></a>00262 {
313<a name="l00263"></a>00263 <span class="keywordflow">return</span> ((begin.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &lt;= <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &lt;= end.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>) ||
314<a name="l00264"></a>00264 (begin.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &gt;= <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &gt;= end.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>));
315<a name="l00265"></a>00265 }
316<a name="l00266"></a>00266 <span class="keywordflow">else</span>
317<a name="l00267"></a>00267 {
318<a name="l00268"></a>00268 <span class="keywordflow">return</span> ((begin.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &lt;= <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &lt;= end.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>) ||
319<a name="l00269"></a>00269 (begin.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &gt;= <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &amp;&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> &gt;= end.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>));
320<a name="l00270"></a>00270 }
321<a name="l00271"></a>00271 }
322<a name="l00272"></a>00272
323<a name="l00274"></a>00274
324<a name="l00278"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a865bbbdb5d5a7408cdf733d573c8d747">00278</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a865bbbdb5d5a7408cdf733d573c8d747" title="Creates an interpolated vector between this vector and another vector.">getInterpolated</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> d)<span class="keyword"> const</span>
325<a name="l00279"></a>00279 <span class="keyword"> </span>{
326<a name="l00280"></a>00280 <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> inv = 1.0f - d;
327<a name="l00281"></a>00281 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>((T)(other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*inv + <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>*d), (T)(other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*inv + <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>*d));
328<a name="l00282"></a>00282 }
329<a name="l00283"></a>00283
330<a name="l00285"></a>00285
331<a name="l00290"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a4d1636973532da5ee0c3c42f96f19ef9">00290</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="classirr_1_1core_1_1vector2d.html#a4d1636973532da5ee0c3c42f96f19ef9" title="Creates a quadratically interpolated vector between this and two other vectors.">getInterpolated_quadratic</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; v2, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; v3, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> d)<span class="keyword"> const</span>
332<a name="l00291"></a>00291 <span class="keyword"> </span>{
333<a name="l00292"></a>00292 <span class="comment">// this*(1-d)*(1-d) + 2 * v2 * (1-d) + v3 * d * d;</span>
334<a name="l00293"></a>00293 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> inv = 1.0f - d;
335<a name="l00294"></a>00294 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> mul0 = inv * inv;
336<a name="l00295"></a>00295 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> mul1 = 2.0f * d * inv;
337<a name="l00296"></a>00296 <span class="keyword">const</span> <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> mul2 = d * d;
338<a name="l00297"></a>00297
339<a name="l00298"></a>00298 <span class="keywordflow">return</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> ( (T)(<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> * mul0 + v2.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> * mul1 + v3.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> * mul2),
340<a name="l00299"></a>00299 (T)(<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> * mul0 + v2.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> * mul1 + v3.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> * mul2));
341<a name="l00300"></a>00300 }
342<a name="l00301"></a>00301
343<a name="l00303"></a>00303
344<a name="l00308"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a85bc48f5c313764fd56b51c730a62210">00308</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; <a class="code" href="classirr_1_1core_1_1vector2d.html#a85bc48f5c313764fd56b51c730a62210" title="Sets this vector to the linearly interpolated vector between a and b.">interpolate</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; a, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; b, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> d)
345<a name="l00309"></a>00309 {
346<a name="l00310"></a>00310 <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> = (T)((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)b.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> + ( ( a.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> - b.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> ) * d ));
347<a name="l00311"></a>00311 <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> = (T)((<a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a>)b.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> + ( ( a.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> - b.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a> ) * d ));
348<a name="l00312"></a>00312 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
349<a name="l00313"></a>00313 }
350<a name="l00314"></a>00314
351<a name="l00316"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d">00316</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a>;
352<a name="l00317"></a>00317
353<a name="l00319"></a><a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c">00319</a> T <a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>;
354<a name="l00320"></a>00320 };
355<a name="l00321"></a>00321
356<a name="l00323"></a><a class="code" href="namespaceirr_1_1core.html#a2cf08556d77f6f5a792973a6e27ed11b">00323</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1vector2d.html">vector2d&lt;f32&gt;</a> <a class="code" href="namespaceirr_1_1core.html#a2cf08556d77f6f5a792973a6e27ed11b" title="Typedef for f32 2d vector.">vector2df</a>;
357<a name="l00324"></a>00324
358<a name="l00326"></a><a class="code" href="namespaceirr_1_1core.html#a990c071a8518ad2b142744b300d0d63c">00326</a> <span class="keyword">typedef</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;s32&gt;</a> <a class="code" href="namespaceirr_1_1core.html#a990c071a8518ad2b142744b300d0d63c" title="Typedef for integer 2d vector.">vector2di</a>;
359<a name="l00327"></a>00327
360<a name="l00328"></a>00328 <span class="keyword">template</span>&lt;<span class="keyword">class</span> S, <span class="keyword">class</span> T&gt;
361<a name="l00329"></a><a class="code" href="namespaceirr_1_1core.html#a2bf9362df9cfbfb4c02a8f5514858cff">00329</a> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a> <a class="code" href="namespaceirr_1_1core.html#abb387ec6f0f654c7ee704345bdded96c">operator*</a>(<span class="keyword">const</span> S scalar, <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; vector) { <span class="keywordflow">return</span> vector*scalar; }
362<a name="l00330"></a>00330
363<a name="l00331"></a>00331 <span class="comment">// These methods are declared in dimension2d, but need definitions of vector2d</span>
364<a name="l00332"></a>00332 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
365<a name="l00333"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a96f90d1d96392bf736a01f8def8aa7db">00333</a> <a class="code" href="classirr_1_1core_1_1dimension2d.html#ae0c2a30ce6283602c454901ef0bd6a04" title="Default constructor for empty dimension.">dimension2d&lt;T&gt;::dimension2d</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other) : Width(other.X), Height(other.Y) { }
366<a name="l00334"></a>00334
367<a name="l00335"></a>00335 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt;
368<a name="l00336"></a><a class="code" href="classirr_1_1core_1_1dimension2d.html#a34c99e1d9d11c1e20dde2ab6a3a0bfb9">00336</a> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1core_1_1dimension2d.html#aa8e64f2adf3d069324e6159cfb6aa82d" title="Equality operator.">dimension2d&lt;T&gt;::operator==</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html" title="2d vector template class with lots of operators and methods.">vector2d&lt;T&gt;</a>&amp; other)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> Width == other.<a class="code" href="classirr_1_1core_1_1vector2d.html#a8fabb0d10a3dd33b407b63bb3539be4d" title="X coordinate of vector.">X</a> &amp;&amp; Height == other.<a class="code" href="classirr_1_1core_1_1vector2d.html#aa4d36f518d3fc35a7aafcea33a31f76c" title="Y coordinate of vector.">Y</a>; }
369<a name="l00337"></a>00337
370<a name="l00338"></a>00338 } <span class="comment">// end namespace core</span>
371<a name="l00339"></a>00339 } <span class="comment">// end namespace irr</span>
372<a name="l00340"></a>00340
373<a name="l00341"></a>00341 <span class="preprocessor">#endif</span>
374<a name="l00342"></a>00342 <span class="preprocessor"></span>
375</pre></div></div>
376</div>
377 <div id="nav-path" class="navpath">
378 <ul>
379 <li class="navelem"><a class="el" href="vector2d_8h.html">vector2d.h</a> </li>
380<!-- window showing the filter options -->
381<div id="MSearchSelectWindow"
382 onmouseover="return searchBox.OnSearchSelectShow()"
383 onmouseout="return searchBox.OnSearchSelectHide()"
384 onkeydown="return searchBox.OnSearchSelectKey(event)">
385<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>
386
387<!-- iframe showing the search results (closed by default) -->
388<div id="MSearchResultsWindow">
389<iframe src="javascript:void(0)" frameborder="0"
390 name="MSearchResults" id="MSearchResults">
391</iframe>
392</div>
393
394
395 <li class="footer">
396<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht
397Engine</a> Documentation &copy; 2003-2012 by Nikolaus Gebhardt. Generated on Sun Nov 17 2013 20:18:40 for Irrlicht 3D Engine by
398<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
399 </ul>
400 </div>
401
402
403</body>
404</html>