Matrix.js
function getData(matrix, array) {
  toArray(matrix, array);

  array.rows = matrix.rows;
  array.cols = matrix.cols;

  return array;
}
function getData(matrix, array) {
  toArray(matrix, array);

  array.rows = matrix.rows;
  array.cols = matrix.cols;

  return array;
}
function getData ( matrix , array ) { toArray ( matrix , array ) ; array . rows = matrix . rows ; array . cols = matrix . cols ; return array ; }
Get the matrix data as an array with properties for rows and cols.

@param {Matrix} matrix The matrix instance.
@param {Array} array The array to use.

@return {Array} The array.

@private
Get the matrix data as an array with properties for rows and cols .