Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1107 | chris | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 | <!-- NewPage --> |
||
| 3 | <html lang="en"> |
||
| 4 | <head> |
||
| 5 | <!-- Generated by javadoc (version 1.7.0_17) on Sun Nov 03 15:35:42 CET 2013 --> |
||
| 6 | <title>Vector (libgdx API)</title> |
||
| 7 | <meta name="date" content="2013-11-03"> |
||
| 8 | <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
||
| 9 | </head> |
||
| 10 | <body> |
||
| 11 | <script type="text/javascript"><!-- |
||
| 12 | if (location.href.indexOf('is-external=true') == -1) { |
||
| 13 | parent.document.title="Vector (libgdx API)"; |
||
| 14 | } |
||
| 15 | //--> |
||
| 16 | </script> |
||
| 17 | <noscript> |
||
| 18 | <div>JavaScript is disabled on your browser.</div> |
||
| 19 | </noscript> |
||
| 20 | <!-- ========= START OF TOP NAVBAR ======= --> |
||
| 21 | <div class="topNav"><a name="navbar_top"> |
||
| 22 | <!-- --> |
||
| 23 | </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
||
| 24 | <!-- --> |
||
| 25 | </a> |
||
| 26 | <ul class="navList" title="Navigation"> |
||
| 27 | <li><a href="../../../../overview-summary.html">Overview</a></li> |
||
| 28 | <li><a href="package-summary.html">Package</a></li> |
||
| 29 | <li class="navBarCell1Rev">Class</li> |
||
| 30 | <li><a href="class-use/Vector.html">Use</a></li> |
||
| 31 | <li><a href="package-tree.html">Tree</a></li> |
||
| 32 | <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
||
| 33 | <li><a href="../../../../index-all.html">Index</a></li> |
||
| 34 | <li><a href="../../../../help-doc.html">Help</a></li> |
||
| 35 | </ul> |
||
| 36 | <div class="aboutLanguage"><em> |
||
| 37 | libgdx API |
||
| 38 | <style> |
||
| 39 | body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt } |
||
| 40 | pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif } |
||
| 41 | h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold } |
||
| 42 | .TableHeadingColor { background:#EEEEFF; } |
||
| 43 | a { text-decoration:none } |
||
| 44 | a:hover { text-decoration:underline } |
||
| 45 | a:link, a:visited { color:blue } |
||
| 46 | table { border:0px } |
||
| 47 | .TableRowColor td:first-child { border-left:1px solid black } |
||
| 48 | .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black } |
||
| 49 | hr { border:0px; border-bottom:1px solid #333366; } |
||
| 50 | </style> |
||
| 51 | </em></div> |
||
| 52 | </div> |
||
| 53 | <div class="subNav"> |
||
| 54 | <ul class="navList"> |
||
| 55 | <li><a href="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><span class="strong">Prev Class</span></a></li> |
||
| 56 | <li><a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math"><span class="strong">Next Class</span></a></li> |
||
| 57 | </ul> |
||
| 58 | <ul class="navList"> |
||
| 59 | <li><a href="../../../../index.html?com/badlogic/gdx/math/Vector.html" target="_top">Frames</a></li> |
||
| 60 | <li><a href="Vector.html" target="_top">No Frames</a></li> |
||
| 61 | </ul> |
||
| 62 | <ul class="navList" id="allclasses_navbar_top"> |
||
| 63 | <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
||
| 64 | </ul> |
||
| 65 | <div> |
||
| 66 | <script type="text/javascript"><!-- |
||
| 67 | allClassesLink = document.getElementById("allclasses_navbar_top"); |
||
| 68 | if(window==top) { |
||
| 69 | allClassesLink.style.display = "block"; |
||
| 70 | } |
||
| 71 | else { |
||
| 72 | allClassesLink.style.display = "none"; |
||
| 73 | } |
||
| 74 | //--> |
||
| 75 | </script> |
||
| 76 | </div> |
||
| 77 | <div> |
||
| 78 | <ul class="subNavList"> |
||
| 79 | <li>Summary: </li> |
||
| 80 | <li>Nested | </li> |
||
| 81 | <li>Field | </li> |
||
| 82 | <li>Constr | </li> |
||
| 83 | <li><a href="#method_summary">Method</a></li> |
||
| 84 | </ul> |
||
| 85 | <ul class="subNavList"> |
||
| 86 | <li>Detail: </li> |
||
| 87 | <li>Field | </li> |
||
| 88 | <li>Constr | </li> |
||
| 89 | <li><a href="#method_detail">Method</a></li> |
||
| 90 | </ul> |
||
| 91 | </div> |
||
| 92 | <a name="skip-navbar_top"> |
||
| 93 | <!-- --> |
||
| 94 | </a></div> |
||
| 95 | <!-- ========= END OF TOP NAVBAR ========= --> |
||
| 96 | <!-- ======== START OF CLASS DATA ======== --> |
||
| 97 | <div class="header"> |
||
| 98 | <div class="subTitle">com.badlogic.gdx.math</div> |
||
| 99 | <h2 title="Interface Vector" class="title">Interface Vector<T extends Vector<T>></h2> |
||
| 100 | </div> |
||
| 101 | <div class="contentContainer"> |
||
| 102 | <div class="description"> |
||
| 103 | <ul class="blockList"> |
||
| 104 | <li class="blockList"> |
||
| 105 | <dl> |
||
| 106 | <dt>All Known Implementing Classes:</dt> |
||
| 107 | <dd><a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math">Vector2</a>, <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></dd> |
||
| 108 | </dl> |
||
| 109 | <hr> |
||
| 110 | <br> |
||
| 111 | <pre>public interface <span class="strong">Vector<T extends Vector<T>></span></pre> |
||
| 112 | <div class="block">Encapsulates a general vector. Allows chaining operations by returning a reference to itself in all modification methods. See |
||
| 113 | <a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math"><code>Vector2</code></a> and <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a> for specific implementations.</div> |
||
| 114 | <dl><dt><span class="strong">Author:</span></dt> |
||
| 115 | <dd>Xoppa</dd></dl> |
||
| 116 | </li> |
||
| 117 | </ul> |
||
| 118 | </div> |
||
| 119 | <div class="summary"> |
||
| 120 | <ul class="blockList"> |
||
| 121 | <li class="blockList"> |
||
| 122 | <!-- ========== METHOD SUMMARY =========== --> |
||
| 123 | <ul class="blockList"> |
||
| 124 | <li class="blockList"><a name="method_summary"> |
||
| 125 | <!-- --> |
||
| 126 | </a> |
||
| 127 | <h3>Method Summary</h3> |
||
| 128 | <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
||
| 129 | <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
||
| 130 | <tr> |
||
| 131 | <th class="colFirst" scope="col">Modifier and Type</th> |
||
| 132 | <th class="colLast" scope="col">Method and Description</th> |
||
| 133 | </tr> |
||
| 134 | <tr class="altColor"> |
||
| 135 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 136 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#add(T)">add</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> |
||
| 137 | <div class="block">Adds the given vector to this vector</div> |
||
| 138 | </td> |
||
| 139 | </tr> |
||
| 140 | <tr class="rowColor"> |
||
| 141 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 142 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#clamp(float, float)">clamp</a></strong>(float min, |
||
| 143 | float max)</code> |
||
| 144 | <div class="block">Clamps this vector's length to given value</div> |
||
| 145 | </td> |
||
| 146 | </tr> |
||
| 147 | <tr class="altColor"> |
||
| 148 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 149 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#cpy()">cpy</a></strong>()</code> </td> |
||
| 150 | </tr> |
||
| 151 | <tr class="rowColor"> |
||
| 152 | <td class="colFirst"><code>float</code></td> |
||
| 153 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#dot(T)">dot</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> </td> |
||
| 154 | </tr> |
||
| 155 | <tr class="altColor"> |
||
| 156 | <td class="colFirst"><code>float</code></td> |
||
| 157 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#dst(T)">dst</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> </td> |
||
| 158 | </tr> |
||
| 159 | <tr class="rowColor"> |
||
| 160 | <td class="colFirst"><code>float</code></td> |
||
| 161 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#dst2(T)">dst2</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> |
||
| 162 | <div class="block">This is much faster to calculate than <a href="../../../../com/badlogic/gdx/math/Vector.html#dst(T)"><code>dst(Vector)</code></a> |
||
| 163 | It avoids a calculating square root, so it is mostly useful for comparisons</div> |
||
| 164 | </td> |
||
| 165 | </tr> |
||
| 166 | <tr class="altColor"> |
||
| 167 | <td class="colFirst"><code>float</code></td> |
||
| 168 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#len()">len</a></strong>()</code> </td> |
||
| 169 | </tr> |
||
| 170 | <tr class="rowColor"> |
||
| 171 | <td class="colFirst"><code>float</code></td> |
||
| 172 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#len2()">len2</a></strong>()</code> </td> |
||
| 173 | </tr> |
||
| 174 | <tr class="altColor"> |
||
| 175 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 176 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#lerp(T, float)">lerp</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> target, |
||
| 177 | float alpha)</code> |
||
| 178 | <div class="block">Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1].</div> |
||
| 179 | </td> |
||
| 180 | </tr> |
||
| 181 | <tr class="rowColor"> |
||
| 182 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 183 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#limit(float)">limit</a></strong>(float limit)</code> |
||
| 184 | <div class="block">Limits this vector's length to given value</div> |
||
| 185 | </td> |
||
| 186 | </tr> |
||
| 187 | <tr class="altColor"> |
||
| 188 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 189 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#nor()">nor</a></strong>()</code> |
||
| 190 | <div class="block">Normalizes this vector.</div> |
||
| 191 | </td> |
||
| 192 | </tr> |
||
| 193 | <tr class="rowColor"> |
||
| 194 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 195 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#scl(float)">scl</a></strong>(float scalar)</code> |
||
| 196 | <div class="block">Scales this vector by a scalar</div> |
||
| 197 | </td> |
||
| 198 | </tr> |
||
| 199 | <tr class="altColor"> |
||
| 200 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 201 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#scl(T)">scl</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> |
||
| 202 | <div class="block">Scales this vector by another vector</div> |
||
| 203 | </td> |
||
| 204 | </tr> |
||
| 205 | <tr class="rowColor"> |
||
| 206 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 207 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#set(T)">set</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> |
||
| 208 | <div class="block">Sets this vector from the given vector</div> |
||
| 209 | </td> |
||
| 210 | </tr> |
||
| 211 | <tr class="altColor"> |
||
| 212 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a></code></td> |
||
| 213 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/math/Vector.html#sub(T)">sub</a></strong>(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</code> |
||
| 214 | <div class="block">Substracts the given vector from this vector.</div> |
||
| 215 | </td> |
||
| 216 | </tr> |
||
| 217 | </table> |
||
| 218 | </li> |
||
| 219 | </ul> |
||
| 220 | </li> |
||
| 221 | </ul> |
||
| 222 | </div> |
||
| 223 | <div class="details"> |
||
| 224 | <ul class="blockList"> |
||
| 225 | <li class="blockList"> |
||
| 226 | <!-- ============ METHOD DETAIL ========== --> |
||
| 227 | <ul class="blockList"> |
||
| 228 | <li class="blockList"><a name="method_detail"> |
||
| 229 | <!-- --> |
||
| 230 | </a> |
||
| 231 | <h3>Method Detail</h3> |
||
| 232 | <a name="cpy()"> |
||
| 233 | <!-- --> |
||
| 234 | </a> |
||
| 235 | <ul class="blockList"> |
||
| 236 | <li class="blockList"> |
||
| 237 | <h4>cpy</h4> |
||
| 238 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> cpy()</pre> |
||
| 239 | <dl><dt><span class="strong">Returns:</span></dt><dd>a copy of this vector</dd></dl> |
||
| 240 | </li> |
||
| 241 | </ul> |
||
| 242 | <a name="len()"> |
||
| 243 | <!-- --> |
||
| 244 | </a> |
||
| 245 | <ul class="blockList"> |
||
| 246 | <li class="blockList"> |
||
| 247 | <h4>len</h4> |
||
| 248 | <pre>float len()</pre> |
||
| 249 | <dl><dt><span class="strong">Returns:</span></dt><dd>The euclidian length</dd></dl> |
||
| 250 | </li> |
||
| 251 | </ul> |
||
| 252 | <a name="len2()"> |
||
| 253 | <!-- --> |
||
| 254 | </a> |
||
| 255 | <ul class="blockList"> |
||
| 256 | <li class="blockList"> |
||
| 257 | <h4>len2</h4> |
||
| 258 | <pre>float len2()</pre> |
||
| 259 | <dl><dt><span class="strong">Returns:</span></dt><dd>The squared euclidian length</dd></dl> |
||
| 260 | </li> |
||
| 261 | </ul> |
||
| 262 | <a name="limit(float)"> |
||
| 263 | <!-- --> |
||
| 264 | </a> |
||
| 265 | <ul class="blockList"> |
||
| 266 | <li class="blockList"> |
||
| 267 | <h4>limit</h4> |
||
| 268 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> limit(float limit)</pre> |
||
| 269 | <div class="block">Limits this vector's length to given value</div> |
||
| 270 | <dl><dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 271 | </li> |
||
| 272 | </ul> |
||
| 273 | <a name="clamp(float, float)"> |
||
| 274 | <!-- --> |
||
| 275 | </a> |
||
| 276 | <ul class="blockList"> |
||
| 277 | <li class="blockList"> |
||
| 278 | <h4>clamp</h4> |
||
| 279 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> clamp(float min, |
||
| 280 | float max)</pre> |
||
| 281 | <div class="block">Clamps this vector's length to given value</div> |
||
| 282 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>min</code> - Min length</dd><dd><code>max</code> - Max length</dd> |
||
| 283 | <dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 284 | </li> |
||
| 285 | </ul> |
||
| 286 | <a name="set(com.badlogic.gdx.math.Vector)"> |
||
| 287 | <!-- --> |
||
| 288 | </a><a name="set(T)"> |
||
| 289 | <!-- --> |
||
| 290 | </a> |
||
| 291 | <ul class="blockList"> |
||
| 292 | <li class="blockList"> |
||
| 293 | <h4>set</h4> |
||
| 294 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> set(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 295 | <div class="block">Sets this vector from the given vector</div> |
||
| 296 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - The vector</dd> |
||
| 297 | <dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 298 | </li> |
||
| 299 | </ul> |
||
| 300 | <a name="sub(com.badlogic.gdx.math.Vector)"> |
||
| 301 | <!-- --> |
||
| 302 | </a><a name="sub(T)"> |
||
| 303 | <!-- --> |
||
| 304 | </a> |
||
| 305 | <ul class="blockList"> |
||
| 306 | <li class="blockList"> |
||
| 307 | <h4>sub</h4> |
||
| 308 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> sub(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 309 | <div class="block">Substracts the given vector from this vector.</div> |
||
| 310 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - The vector</dd> |
||
| 311 | <dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 312 | </li> |
||
| 313 | </ul> |
||
| 314 | <a name="nor()"> |
||
| 315 | <!-- --> |
||
| 316 | </a> |
||
| 317 | <ul class="blockList"> |
||
| 318 | <li class="blockList"> |
||
| 319 | <h4>nor</h4> |
||
| 320 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> nor()</pre> |
||
| 321 | <div class="block">Normalizes this vector. Does nothing if it is zero.</div> |
||
| 322 | <dl><dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 323 | </li> |
||
| 324 | </ul> |
||
| 325 | <a name="add(com.badlogic.gdx.math.Vector)"> |
||
| 326 | <!-- --> |
||
| 327 | </a><a name="add(T)"> |
||
| 328 | <!-- --> |
||
| 329 | </a> |
||
| 330 | <ul class="blockList"> |
||
| 331 | <li class="blockList"> |
||
| 332 | <h4>add</h4> |
||
| 333 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> add(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 334 | <div class="block">Adds the given vector to this vector</div> |
||
| 335 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - The vector</dd> |
||
| 336 | <dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 337 | </li> |
||
| 338 | </ul> |
||
| 339 | <a name="dot(com.badlogic.gdx.math.Vector)"> |
||
| 340 | <!-- --> |
||
| 341 | </a><a name="dot(T)"> |
||
| 342 | <!-- --> |
||
| 343 | </a> |
||
| 344 | <ul class="blockList"> |
||
| 345 | <li class="blockList"> |
||
| 346 | <h4>dot</h4> |
||
| 347 | <pre>float dot(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 348 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - The other vector</dd> |
||
| 349 | <dt><span class="strong">Returns:</span></dt><dd>The dot product between this and the other vector</dd></dl> |
||
| 350 | </li> |
||
| 351 | </ul> |
||
| 352 | <a name="scl(float)"> |
||
| 353 | <!-- --> |
||
| 354 | </a> |
||
| 355 | <ul class="blockList"> |
||
| 356 | <li class="blockList"> |
||
| 357 | <h4>scl</h4> |
||
| 358 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> scl(float scalar)</pre> |
||
| 359 | <div class="block">Scales this vector by a scalar</div> |
||
| 360 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>scalar</code> - The scalar</dd> |
||
| 361 | <dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 362 | </li> |
||
| 363 | </ul> |
||
| 364 | <a name="scl(com.badlogic.gdx.math.Vector)"> |
||
| 365 | <!-- --> |
||
| 366 | </a><a name="scl(T)"> |
||
| 367 | <!-- --> |
||
| 368 | </a> |
||
| 369 | <ul class="blockList"> |
||
| 370 | <li class="blockList"> |
||
| 371 | <h4>scl</h4> |
||
| 372 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> scl(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 373 | <div class="block">Scales this vector by another vector</div> |
||
| 374 | <dl><dt><span class="strong">Returns:</span></dt><dd>This vector for chaining</dd></dl> |
||
| 375 | </li> |
||
| 376 | </ul> |
||
| 377 | <a name="dst(com.badlogic.gdx.math.Vector)"> |
||
| 378 | <!-- --> |
||
| 379 | </a><a name="dst(T)"> |
||
| 380 | <!-- --> |
||
| 381 | </a> |
||
| 382 | <ul class="blockList"> |
||
| 383 | <li class="blockList"> |
||
| 384 | <h4>dst</h4> |
||
| 385 | <pre>float dst(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 386 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - The other vector</dd> |
||
| 387 | <dt><span class="strong">Returns:</span></dt><dd>the distance between this and the other vector</dd></dl> |
||
| 388 | </li> |
||
| 389 | </ul> |
||
| 390 | <a name="dst2(com.badlogic.gdx.math.Vector)"> |
||
| 391 | <!-- --> |
||
| 392 | </a><a name="dst2(T)"> |
||
| 393 | <!-- --> |
||
| 394 | </a> |
||
| 395 | <ul class="blockList"> |
||
| 396 | <li class="blockList"> |
||
| 397 | <h4>dst2</h4> |
||
| 398 | <pre>float dst2(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> v)</pre> |
||
| 399 | <div class="block">This is much faster to calculate than <a href="../../../../com/badlogic/gdx/math/Vector.html#dst(T)"><code>dst(Vector)</code></a> |
||
| 400 | It avoids a calculating square root, so it is mostly useful for comparisons</div> |
||
| 401 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>v</code> - The other vector</dd> |
||
| 402 | <dt><span class="strong">Returns:</span></dt><dd>the squared distance between this and the other vector</dd></dl> |
||
| 403 | </li> |
||
| 404 | </ul> |
||
| 405 | <a name="lerp(com.badlogic.gdx.math.Vector,float)"> |
||
| 406 | <!-- --> |
||
| 407 | </a><a name="lerp(T, float)"> |
||
| 408 | <!-- --> |
||
| 409 | </a> |
||
| 410 | <ul class="blockListLast"> |
||
| 411 | <li class="blockList"> |
||
| 412 | <h4>lerp</h4> |
||
| 413 | <pre><a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> lerp(<a href="../../../../com/badlogic/gdx/math/Vector.html" title="type parameter in Vector">T</a> target, |
||
| 414 | float alpha)</pre> |
||
| 415 | <div class="block">Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is stored |
||
| 416 | in this vector.</div> |
||
| 417 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - The target vector</dd><dd><code>alpha</code> - The interpolation coefficient</dd> |
||
| 418 | <dt><span class="strong">Returns:</span></dt><dd>This vector for chaining.</dd></dl> |
||
| 419 | </li> |
||
| 420 | </ul> |
||
| 421 | </li> |
||
| 422 | </ul> |
||
| 423 | </li> |
||
| 424 | </ul> |
||
| 425 | </div> |
||
| 426 | </div> |
||
| 427 | <!-- ========= END OF CLASS DATA ========= --> |
||
| 428 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
||
| 429 | <div class="bottomNav"><a name="navbar_bottom"> |
||
| 430 | <!-- --> |
||
| 431 | </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
||
| 432 | <!-- --> |
||
| 433 | </a> |
||
| 434 | <ul class="navList" title="Navigation"> |
||
| 435 | <li><a href="../../../../overview-summary.html">Overview</a></li> |
||
| 436 | <li><a href="package-summary.html">Package</a></li> |
||
| 437 | <li class="navBarCell1Rev">Class</li> |
||
| 438 | <li><a href="class-use/Vector.html">Use</a></li> |
||
| 439 | <li><a href="package-tree.html">Tree</a></li> |
||
| 440 | <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
||
| 441 | <li><a href="../../../../index-all.html">Index</a></li> |
||
| 442 | <li><a href="../../../../help-doc.html">Help</a></li> |
||
| 443 | </ul> |
||
| 444 | <div class="aboutLanguage"><em>libgdx API</em></div> |
||
| 445 | </div> |
||
| 446 | <div class="subNav"> |
||
| 447 | <ul class="navList"> |
||
| 448 | <li><a href="../../../../com/badlogic/gdx/math/Rectangle.html" title="class in com.badlogic.gdx.math"><span class="strong">Prev Class</span></a></li> |
||
| 449 | <li><a href="../../../../com/badlogic/gdx/math/Vector2.html" title="class in com.badlogic.gdx.math"><span class="strong">Next Class</span></a></li> |
||
| 450 | </ul> |
||
| 451 | <ul class="navList"> |
||
| 452 | <li><a href="../../../../index.html?com/badlogic/gdx/math/Vector.html" target="_top">Frames</a></li> |
||
| 453 | <li><a href="Vector.html" target="_top">No Frames</a></li> |
||
| 454 | </ul> |
||
| 455 | <ul class="navList" id="allclasses_navbar_bottom"> |
||
| 456 | <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
||
| 457 | </ul> |
||
| 458 | <div> |
||
| 459 | <script type="text/javascript"><!-- |
||
| 460 | allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
||
| 461 | if(window==top) { |
||
| 462 | allClassesLink.style.display = "block"; |
||
| 463 | } |
||
| 464 | else { |
||
| 465 | allClassesLink.style.display = "none"; |
||
| 466 | } |
||
| 467 | //--> |
||
| 468 | </script> |
||
| 469 | </div> |
||
| 470 | <div> |
||
| 471 | <ul class="subNavList"> |
||
| 472 | <li>Summary: </li> |
||
| 473 | <li>Nested | </li> |
||
| 474 | <li>Field | </li> |
||
| 475 | <li>Constr | </li> |
||
| 476 | <li><a href="#method_summary">Method</a></li> |
||
| 477 | </ul> |
||
| 478 | <ul class="subNavList"> |
||
| 479 | <li>Detail: </li> |
||
| 480 | <li>Field | </li> |
||
| 481 | <li>Constr | </li> |
||
| 482 | <li><a href="#method_detail">Method</a></li> |
||
| 483 | </ul> |
||
| 484 | </div> |
||
| 485 | <a name="skip-navbar_bottom"> |
||
| 486 | <!-- --> |
||
| 487 | </a></div> |
||
| 488 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
||
| 489 | <p class="legalCopy"><small> |
||
| 490 | <div style="font-size:9pt"><i> |
||
| 491 | Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com) |
||
| 492 | </i></div> |
||
| 493 | </small></p> |
||
| 494 | </body> |
||
| 495 | </html> |