mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 09:03:29 +00:00
11 lines
570 B
TypeScript
11 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;
|