/** * Rotates the given matrix (array of arrays). * * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. * * @method * @param {Array} 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} The rotated matrix. The source matrix should be discarded for the returned matrix. */ export default function (matrix: any, direction: any): any;