如何将多个 Float32Arrays 连接成一个 Float32Array

问题描述

我有一个 float32arrays 数组,并且想要一个函数将它们展平为一个大的 float32array

const first = new Float32Array([1,2]);
const second = new Float32Array([3,4,5]);
const third = new Float32Array([6,7,8,9]);

const chunks = [first,second,third];


//this function should take an array of flaot32arrays 
//and return a new float32array which is the combination of the float32arrays in the input. 
const flattenFloat32 = (chunks) => {
  //Need code for this function
  return 

}

console.log(flattenFloat32(chunks))

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)