function createArrayOfSameType(srcArray, length) {
  var arraySrc = getArray(srcArray);
  var newArray = new arraySrc.constructor(length);
  var newArraySpec = newArray; // If it appears to have been augmented make new one augmented

  if (arraySrc.numComponents && arraySrc.numElements) {
    augmentTypedArray(newArray, arraySrc.numComponents);
  } // If it was a full spec make new one a full spec


  if (srcArray.data) {
    newArraySpec = {
      data: newArray
    };
    helper.copyNamedProperties(arraySpecPropertyNames, srcArray, newArraySpec);
  }

  return newArraySpec;
}
Creates an array of the same time

@param {(number[]|ArrayBufferView|module:twgl.FullArraySpec)} srcArray array who's type to copy
@param {number} length size of new array
@return {(number[]|ArrayBufferView|module:twgl.FullArraySpec)} array with same type as srcArray
@private