You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/utils/Utils.js
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -102,25 +102,26 @@ Phaser.Utils = {
102
102
},
103
103
104
104
/**
105
-
* Transposes the elements of the given Array.
105
+
* Transposes the elements of the given matrix (array of arrays).
106
106
*
107
107
* @method Phaser.Utils.transposeArray
108
-
* @param {array[]} array - The array to transpose.
109
-
* @return {array[]} The transposed array.
108
+
* @param {Array<any[]>} array - The matrix to transpose.
109
+
* @return {Array<any[]>} A new transposed matrix
110
110
* @deprecated 2.2.0 - Use Phaser.ArrayUtils.transposeMatrix
111
111
*/
112
112
transposeArray: function(array){
113
113
returnPhaser.ArrayUtils.transposeMatrix(array);
114
114
},
115
115
116
116
/**
117
-
* Rotates the given array.
118
-
* Based on the routine from http://jsfiddle.net/MrPolywhirl/NH42z/
117
+
* Rotates the given matrix (array of arrays).
118
+
*
119
+
* Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.
119
120
*
120
121
* @method Phaser.Utils.rotateArray
121
-
* @param {array[]} matrix - The array to rotate.
122
-
* @param {number|string} direction - The amount to rotate. Either a number: 90, -90, 270, -270, 180 or a string: 'rotateLeft', 'rotateRight' or 'rotate180'
123
-
* @return {array[]} The rotated array
122
+
* @param {Array<any[]>} matrix - The array to rotate; this matrix _may_ be altered.
123
+
* @param {number|string} direction - The amount to rotate: the roation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180').
124
+
* @return {Array<any[]>} The rotated matrix. The source matrix should be discarded for the returned matrix.
124
125
* @deprecated 2.2.0 - Use Phaser.ArrayUtils.rotateMatrix
0 commit comments