forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRotateLeft.js
More file actions
27 lines (24 loc) · 710 Bytes
/
Copy pathRotateLeft.js
File metadata and controls
27 lines (24 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2019 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
var RotateMatrix = require('./RotateMatrix');
/**
* Rotates the array matrix to the left (or 90 degrees)
*
* @function Phaser.Utils.Array.Matrix.RotateLeft
* @since 3.0.0
*
* @generic T
* @genericUse {T[][]} - [matrix,$return]
*
* @param {T[][]} [matrix] - The array to rotate.
*
* @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.
*/
var RotateLeft = function (matrix)
{
return RotateMatrix(matrix, 90);
};
module.exports = RotateLeft;