@@ -18,15 +18,15 @@ var Class = require('../utils/Class');
1818
1919/**
2020 * @classdesc
21- * [description]
21+ * A representation of a vector in 2D space.
2222 *
2323 * @class Vector2
2424 * @memberOf Phaser.Math
2525 * @constructor
2626 * @since 3.0.0
2727 *
28- * @param {number } [x] - [description]
29- * @param {number } [y] - [description]
28+ * @param {number } [x] - The x component of this Vector.
29+ * @param {number } [y] - The y component of this Vector.
3030 */
3131var Vector2 = new Class ( {
3232
@@ -69,7 +69,7 @@ var Vector2 = new Class({
6969 } ,
7070
7171 /**
72- * [description]
72+ * Make a clone of this Vector2.
7373 *
7474 * @method Phaser.Math.Vector2#clone
7575 * @since 3.0.0
@@ -82,12 +82,12 @@ var Vector2 = new Class({
8282 } ,
8383
8484 /**
85- * [description]
85+ * Copy the components of a given vector, into this Vector.
8686 *
8787 * @method Phaser.Math.Vector2#copy
8888 * @since 3.0.0
8989 *
90- * @param {Phaser.Math.Vector2 } src - [description]
90+ * @param {Phaser.Math.Vector2 } src - The Vector to copy the components from.
9191 *
9292 * @return {Phaser.Math.Vector2 } This Vector2.
9393 */
@@ -100,12 +100,12 @@ var Vector2 = new Class({
100100 } ,
101101
102102 /**
103- * [description]
103+ * Set the component values of this Vector from a given Vector2Like object.
104104 *
105105 * @method Phaser.Math.Vector2#setFromObject
106106 * @since 3.0.0
107107 *
108- * @param {Vector2Like } obj - [description]
108+ * @param {Vector2Like } obj - The object containing the component values to set for this Vector.
109109 *
110110 * @return {Phaser.Math.Vector2 } This Vector2.
111111 */
@@ -118,13 +118,13 @@ var Vector2 = new Class({
118118 } ,
119119
120120 /**
121- * [description]
121+ * Set the x and y components of the this Vector to the given x and y values.
122122 *
123123 * @method Phaser.Math.Vector2#set
124124 * @since 3.0.0
125125 *
126- * @param {number } x - [description]
127- * @param {number } [y=x] - [description]
126+ * @param {number } x - The x value to set for this Vector.
127+ * @param {number } [y=x] - The y value to set for this Vector.
128128 *
129129 * @return {Phaser.Math.Vector2 } This Vector2.
130130 */
@@ -144,8 +144,8 @@ var Vector2 = new Class({
144144 * @method Phaser.Math.Vector2#setTo
145145 * @since 3.4.0
146146 *
147- * @param {number } x - [description]
148- * @param {number } [y=x] - [description]
147+ * @param {number } x - The x value to set for this Vector.
148+ * @param {number } [y=x] - The y value to set for this Vector.
149149 *
150150 * @return {Phaser.Math.Vector2 } This Vector2.
151151 */
@@ -176,27 +176,27 @@ var Vector2 = new Class({
176176 } ,
177177
178178 /**
179- * [description]
179+ * Check if this Vector is equal to a given Vector.
180180 *
181181 * @method Phaser.Math.Vector2#equals
182182 * @since 3.0.0
183183 *
184- * @param {Phaser.Math.Vector2 } v - [description]
184+ * @param {Phaser.Math.Vector2 } v - The vector to compare with this Vector.
185185 *
186- * @return {boolean } [description]
186+ * @return {boolean } Whether the given Vector is equal to this Vector.
187187 */
188188 equals : function ( v )
189189 {
190190 return ( ( this . x === v . x ) && ( this . y === v . y ) ) ;
191191 } ,
192192
193193 /**
194- * [description]
194+ * Calculate the angle between this Vector and the positive x-axis, in radians.
195195 *
196196 * @method Phaser.Math.Vector2#angle
197197 * @since 3.0.0
198198 *
199- * @return {number } [description]
199+ * @return {number } The angle between this Vector, and the positive x-axis, given in radians.
200200 */
201201 angle : function ( )
202202 {
@@ -213,12 +213,12 @@ var Vector2 = new Class({
213213 } ,
214214
215215 /**
216- * [description]
216+ * Add a given Vector to this Vector. Addition is element-wise.
217217 *
218218 * @method Phaser.Math.Vector2#add
219219 * @since 3.0.0
220220 *
221- * @param {Phaser.Math.Vector2 } src - [description]
221+ * @param {Phaser.Math.Vector2 } src - The Vector to add to this Vector.
222222 *
223223 * @return {Phaser.Math.Vector2 } This Vector2.
224224 */
@@ -231,12 +231,12 @@ var Vector2 = new Class({
231231 } ,
232232
233233 /**
234- * [description]
234+ * Subtract the given Vector from this Vector. Subtraction is element-wise.
235235 *
236236 * @method Phaser.Math.Vector2#subtract
237237 * @since 3.0.0
238238 *
239- * @param {Phaser.Math.Vector2 } src - [description]
239+ * @param {Phaser.Math.Vector2 } src - The Vector to subtract from this Vector.
240240 *
241241 * @return {Phaser.Math.Vector2 } This Vector2.
242242 */
@@ -249,12 +249,12 @@ var Vector2 = new Class({
249249 } ,
250250
251251 /**
252- * [description]
252+ * Perform an element-wise multiplication between this Vector and the given Vector.
253253 *
254254 * @method Phaser.Math.Vector2#multiply
255255 * @since 3.0.0
256256 *
257- * @param {Phaser.Math.Vector2 } src - [description]
257+ * @param {Phaser.Math.Vector2 } src - The Vector to multiply this Vector by.
258258 *
259259 * @return {Phaser.Math.Vector2 } This Vector2.
260260 */
@@ -267,12 +267,12 @@ var Vector2 = new Class({
267267 } ,
268268
269269 /**
270- * [description]
270+ * Scale this Vector by the given value.
271271 *
272272 * @method Phaser.Math.Vector2#scale
273273 * @since 3.0.0
274274 *
275- * @param {number } value - [description]
275+ * @param {number } value - The value to scale this Vector by.
276276 *
277277 * @return {Phaser.Math.Vector2 } This Vector2.
278278 */
@@ -293,12 +293,12 @@ var Vector2 = new Class({
293293 } ,
294294
295295 /**
296- * [description]
296+ * Perform an element-wise division between this Vector and the given Vector. This Vector is divided by the given Vector.
297297 *
298298 * @method Phaser.Math.Vector2#divide
299299 * @since 3.0.0
300300 *
301- * @param {Phaser.Math.Vector2 } src - [description]
301+ * @param {Phaser.Math.Vector2 } src - The Vector to divide this Vector by.
302302 *
303303 * @return {Phaser.Math.Vector2 } This Vector2.
304304 */
@@ -311,7 +311,7 @@ var Vector2 = new Class({
311311 } ,
312312
313313 /**
314- * [description]
314+ * Negate the x and y components of this Vector.
315315 *
316316 * @method Phaser.Math.Vector2#negate
317317 * @since 3.0.0
@@ -327,14 +327,14 @@ var Vector2 = new Class({
327327 } ,
328328
329329 /**
330- * [description]
330+ * Calculate the distance between this Vector, and the given Vector.
331331 *
332332 * @method Phaser.Math.Vector2#distance
333333 * @since 3.0.0
334334 *
335- * @param {Phaser.Math.Vector2 } src - [description]
335+ * @param {Phaser.Math.Vector2 } src - The Vector to calculate the distance to.
336336 *
337- * @return {number } [description]
337+ * @return {number } The distance to the given Vector from this Vector.
338338 */
339339 distance : function ( src )
340340 {
@@ -345,14 +345,14 @@ var Vector2 = new Class({
345345 } ,
346346
347347 /**
348- * [description]
348+ * The distance between this Vector, and the given Vector, squared.
349349 *
350350 * @method Phaser.Math.Vector2#distanceSq
351351 * @since 3.0.0
352352 *
353- * @param {Phaser.Math.Vector2 } src - [description]
353+ * @param {Phaser.Math.Vector2 } src - The Vector to calculate the distance to.
354354 *
355- * @return {number } [description]
355+ * @return {number } The distance to this Vector and the given Vector, squared.
356356 */
357357 distanceSq : function ( src )
358358 {
@@ -363,12 +363,12 @@ var Vector2 = new Class({
363363 } ,
364364
365365 /**
366- * [description]
366+ * The length (or magnitude) of this Vector.
367367 *
368368 * @method Phaser.Math.Vector2#length
369369 * @since 3.0.0
370370 *
371- * @return {number } [description]
371+ * @return {number } The length of this Vector.
372372 */
373373 length : function ( )
374374 {
@@ -379,12 +379,12 @@ var Vector2 = new Class({
379379 } ,
380380
381381 /**
382- * [description]
382+ * Calculate the length of this Vector squared.
383383 *
384384 * @method Phaser.Math.Vector2#lengthSq
385385 * @since 3.0.0
386386 *
387- * @return {number } [description]
387+ * @return {number } The length of this Vector, squared.
388388 */
389389 lengthSq : function ( )
390390 {
@@ -395,7 +395,7 @@ var Vector2 = new Class({
395395 } ,
396396
397397 /**
398- * [description]
398+ * Normalise this Vector, that is, make it a unit length vector (magnitude of 1) in the same direction.
399399 *
400400 * @method Phaser.Math.Vector2#normalize
401401 * @since 3.0.0
@@ -440,14 +440,14 @@ var Vector2 = new Class({
440440 } ,
441441
442442 /**
443- * [description]
443+ * Perform a dot product between this Vector and the given Vector
444444 *
445445 * @method Phaser.Math.Vector2#dot
446446 * @since 3.0.0
447447 *
448- * @param {Phaser.Math.Vector2 } src - [description]
448+ * @param {Phaser.Math.Vector2 } src - The Vector2 to dot product with this Vector2.
449449 *
450- * @return {number } [description]
450+ * @return {number } The result of the dot product
451451 */
452452 dot : function ( src )
453453 {
@@ -538,7 +538,7 @@ var Vector2 = new Class({
538538 } ,
539539
540540 /**
541- * [description]
541+ * Make this Vector the zero vector (0, 0).
542542 *
543543 * @method Phaser.Math.Vector2#reset
544544 * @since 3.0.0
0 commit comments