Static

Description

(>= 1.3.0) Transforms a one-dimensional array to a table with two Diemension

Usage

Parameters

  • array {Array}

    The one-dimensional array to convert

  • width {Integer}

    Width of the matrix created

  • height {Integer}

    Height of the matrix created

Returns

Array

Example

CE.toMatrix([1, 2, 3, 4], 2, 2); // => [[1, 2], [3, 4]]

Discussion