@@ -64,9 +64,9 @@ export class Matrix extends Events {
6464 /**
6565 * @name Two.Matrix.Multiply
6666 * @function
67- * @param {Number[] } A
68- * @param {Number[] } B
69- * @param {Number[] } [C] - An optional matrix to apply the multiplication to.
67+ * @param {Number[] } A - The first { @link Two.Matrix} to multiply
68+ * @param {Number[] } B - The second { @link Two.Matrix} to multiply
69+ * @param {Number[] } [C] - An optional { @link Two.Matrix} to apply the result to
7070 * @returns {Number[] } - If an optional `C` matrix isn't passed then a new one is created and returned.
7171 * @description Multiply two matrices together and return the result.
7272 */
@@ -141,22 +141,22 @@ export class Matrix extends Events {
141141 /**
142142 * @name Two.Matrix#set
143143 * @function
144- * @param {Number } a - The value for element at the first column and first row.
145- * @param {Number } b - The value for element at the second column and first row.
146- * @param {Number } c - The value for element at the third column and first row.
147- * @param {Number } d - The value for element at the first column and second row.
148- * @param {Number } e - The value for element at the second column and second row.
149- * @param {Number } f - The value for element at the third column and second row.
150- * @param {Number } g - The value for element at the first column and third row.
151- * @param {Number } h - The value for element at the second column and third row.
152- * @param {Number } i - The value for element at the third column and third row.
144+ * @param {Number } a - The value for element at the first column and first row
145+ * @param {Number } b - The value for element at the second column and first row
146+ * @param {Number } c - The value for element at the third column and first row
147+ * @param {Number } d - The value for element at the first column and second row
148+ * @param {Number } e - The value for element at the second column and second row
149+ * @param {Number } f - The value for element at the third column and second row
150+ * @param {Number } g - The value for element at the first column and third row
151+ * @param {Number } h - The value for element at the second column and third row
152+ * @param {Number } i - The value for element at the third column and third row
153153 * @description Set an array of values onto the matrix. Order described in {@link Two.Matrix}.
154154 */
155155
156156 /**
157157 * @name Two.Matrix#set
158158 * @function
159- * @param {Number[] } a - The array of elements to apply.
159+ * @param {Number[] } a - The array of elements to apply
160160 * @description Set an array of values onto the matrix. Order described in {@link Two.Matrix}.
161161 */
162162 set ( a , b , c , d , e , f , g , h , i ) {
@@ -189,6 +189,7 @@ export class Matrix extends Events {
189189 /**
190190 * @name Two.Matrix#copy
191191 * @function
192+ * @param {Two.Matrix } m - The matrix to copy
192193 * @description Copy the matrix of one to the current instance.
193194 */
194195 copy ( m ) {
@@ -229,17 +230,17 @@ export class Matrix extends Events {
229230 /**
230231 * @name Two.Matrix#multiply
231232 * @function
232- * @param {Number } a - The scalar to be multiplied.
233+ * @param {Number } s - The scalar to be multiplied.
233234 * @description Multiply all components of the matrix against a single scalar value.
234235 * @overloaded
235236 */
236237
237238 /**
238239 * @name Two.Matrix#multiply
239240 * @function
240- * @param {Number } a - The x component to be multiplied.
241- * @param {Number } b - The y component to be multiplied.
242- * @param {Number } c - The z component to be multiplied.
241+ * @param {Number } x - The `x` component to be multiplied.
242+ * @param {Number } y - The `y` component to be multiplied.
243+ * @param {Number } z - The `z` component to be multiplied.
243244 * @description Multiply all components of a matrix against a 3 component vector.
244245 * @overloaded
245246 */
@@ -341,12 +342,12 @@ export class Matrix extends Events {
341342 /**
342343 * @name Two.Matrix#inverse
343344 * @function
344- * @param {Two.Matrix } [out ] - The optional matrix to apply the inversion to.
345+ * @param {Two.Matrix } [output ] - The optional matrix to apply the inversion to.
345346 * @description Return an inverted version of the matrix. If no optional one is passed a new matrix is created and returned.
346347 */
347- inverse ( out ) {
348+ inverse ( output ) {
348349 const a = this . elements ;
349- out = out || new Matrix ( ) ;
350+ output = output || new Matrix ( ) ;
350351
351352 const a00 = a [ 0 ] ,
352353 a01 = a [ 1 ] ,
@@ -371,23 +372,23 @@ export class Matrix extends Events {
371372
372373 det = 1.0 / det ;
373374
374- out . elements [ 0 ] = b01 * det ;
375- out . elements [ 1 ] = ( - a22 * a01 + a02 * a21 ) * det ;
376- out . elements [ 2 ] = ( a12 * a01 - a02 * a11 ) * det ;
377- out . elements [ 3 ] = b11 * det ;
378- out . elements [ 4 ] = ( a22 * a00 - a02 * a20 ) * det ;
379- out . elements [ 5 ] = ( - a12 * a00 + a02 * a10 ) * det ;
380- out . elements [ 6 ] = b21 * det ;
381- out . elements [ 7 ] = ( - a21 * a00 + a01 * a20 ) * det ;
382- out . elements [ 8 ] = ( a11 * a00 - a01 * a10 ) * det ;
383-
384- return out ;
375+ output . elements [ 0 ] = b01 * det ;
376+ output . elements [ 1 ] = ( - a22 * a01 + a02 * a21 ) * det ;
377+ output . elements [ 2 ] = ( a12 * a01 - a02 * a11 ) * det ;
378+ output . elements [ 3 ] = b11 * det ;
379+ output . elements [ 4 ] = ( a22 * a00 - a02 * a20 ) * det ;
380+ output . elements [ 5 ] = ( - a12 * a00 + a02 * a10 ) * det ;
381+ output . elements [ 6 ] = b21 * det ;
382+ output . elements [ 7 ] = ( - a21 * a00 + a01 * a20 ) * det ;
383+ output . elements [ 8 ] = ( a11 * a00 - a01 * a10 ) * det ;
384+
385+ return output ;
385386 }
386387
387388 /**
388389 * @name Two.Matrix#scale
389390 * @function
390- * @param {Number } scale - The one dimensional scale to apply to the matrix.
391+ * @param {Number } s - The one dimensional scale to apply to the matrix.
391392 * @description Uniformly scale the transformation matrix.
392393 */
393394
@@ -410,22 +411,22 @@ export class Matrix extends Events {
410411 /**
411412 * @name Two.Matrix#rotate
412413 * @function
413- * @param {Number } Number - The amount to rotate in Number.
414+ * @param {Number } n - The amount to rotate in Number.
414415 * @description Rotate the matrix.
415416 */
416- rotate ( Number ) {
417- const c = cos ( Number ) ;
418- const s = sin ( Number ) ;
417+ rotate ( n ) {
418+ const c = cos ( n ) ;
419+ const s = sin ( n ) ;
419420
420421 return this . multiply ( c , - s , 0 , s , c , 0 , 0 , 0 , 1 ) ;
421422 }
422423
423424 /**
424425 * @name Two.Matrix#translate
425426 * @function
426- * @param {Number } x - The horizontal translation value to apply.
427- * @param {Number } y - The vertical translation value to apply.
428- * @description Translate the matrix.
427+ * @param {Number } x - The horizontal translation value to apply
428+ * @param {Number } y - The vertical translation value to apply
429+ * @description Translate the matrix to specific `x` / `y` values .
429430 */
430431 translate ( x , y ) {
431432 return this . multiply ( 1 , 0 , x , 0 , 1 , y , 0 , 0 , 1 ) ;
@@ -434,23 +435,23 @@ export class Matrix extends Events {
434435 /**
435436 * @name Two.Matrix#skewX
436437 * @function
437- * @param {Number } Number - The amount to skew in Number.
438+ * @param {Number } n - The amount to skew
438439 * @description Skew the matrix by an angle in the x axis direction.
439440 */
440- skewX ( Number ) {
441- const a = tan ( Number ) ;
441+ skewX ( n ) {
442+ const a = tan ( n ) ;
442443
443444 return this . multiply ( 1 , a , 0 , 0 , 1 , 0 , 0 , 0 , 1 ) ;
444445 }
445446
446447 /**
447448 * @name Two.Matrix#skewY
448449 * @function
449- * @param {Number } Number - The amount to skew in Number.
450+ * @param {Number } n - The amount to skew
450451 * @description Skew the matrix by an angle in the y axis direction.
451452 */
452- skewY ( Number ) {
453- const a = tan ( Number ) ;
453+ skewY ( n ) {
454+ const a = tan ( n ) ;
454455
455456 return this . multiply ( 1 , 0 , 0 , a , 1 , 0 , 0 , 0 , 1 ) ;
456457 }
0 commit comments