mirror of
https://github.com/photonstorm/phaser
synced 2024-12-19 17:44:45 +00:00
12 lines
570 B
TypeScript
12 lines
570 B
TypeScript
|
/**
|
||
|
* Rotates the given matrix (array of arrays).
|
||
|
*
|
||
|
* Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.
|
||
|
*
|
||
|
* @method
|
||
|
* @param {Array<any[]>} matrix - The array to rotate; this matrix _may_ be altered.
|
||
|
* @param {number|string} direction - The amount to rotate: the rotation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180').
|
||
|
* @return {Array<any[]>} The rotated matrix. The source matrix should be discarded for the returned matrix.
|
||
|
*/
|
||
|
export default function (matrix: any, direction: any): any;
|