Skip to content

Instantly share code, notes, and snippets.

@jt0dd
Created September 3, 2018 21:04
Show Gist options
  • Select an option

  • Save jt0dd/6eb965cfdca74b78f4064d566c1ccf73 to your computer and use it in GitHub Desktop.

Select an option

Save jt0dd/6eb965cfdca74b78f4064d566c1ccf73 to your computer and use it in GitHub Desktop.
static flatten2dArrayTo(array, target) {
let offset = 0;
for (let y = 0; y < array.length; y++) {
target.set(array[y], offset);
offset += array[y].length;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment