Matrix.js
function toArray(matrix, array) {
  for (var i = 0, l = matrix.length; i < l; i++) {
    array[i] = matrix[i];
  }

  return array;
}
function toArray(matrix, array) {
  for (var i = 0, l = matrix.length; i < l; i++) {
    array[i] = matrix[i];
  }

  return array;
}
function toArray ( matrix , array ) { for ( var i = 0 , l = matrix . length ; i < l ; i ++ ) { array [ i ] = matrix [ i ] ; } return array ; }
Convert a matrix to an array with the values.

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

@return {Array} The array.

@private
Convert a matrix to an array with the values .