mirror of
https://github.com/photonstorm/phaser
synced 2024-12-23 11:33:28 +00:00
Allow to have one row matrix in CheckMatrix
This commit is contained in:
parent
8283d5cb10
commit
c7fd4c4e0a
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
|||
* Checks if an array can be used as a matrix.
|
||||
*
|
||||
* A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows)
|
||||
* have the same length. There must be at least two rows. This is an example matrix:
|
||||
* have the same length. This is an example matrix:
|
||||
*
|
||||
* ```
|
||||
* [
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
var CheckMatrix = function (matrix)
|
||||
{
|
||||
if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))
|
||||
if (!Array.isArray(matrix) || !Array.isArray(matrix[0]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue