build/modelscript.umd.js
function pivotVector(vectors=[]) {
              return vectors.reduce((result, val, index/*, arr*/) => {
                val.forEach((vecVal, i) => {
                  (index === 0)
                    ? (result.push([vecVal, ]))
                    : (result[ i ].push(vecVal));
                });
                return result;
              }, []);
            }
function pivotVector(vectors=[]) {
              return vectors.reduce((result, val, index/*, arr*/) => {
                val.forEach((vecVal, i) => {
                  (index === 0)
                    ? (result.push([vecVal, ]))
                    : (result[ i ].push(vecVal));
                });
                return result;
              }, []);
            }
function pivotVector ( vectors = [ ] ) { return vectors . reduce ( ( result , val , index /*, arr*/ ) => { val . forEach ( ( vecVal , i ) => { ( index === 0 ) ? ( result . push ( [ vecVal , ] ) ) : ( result [ i ] . push ( vecVal ) ) ; } ) ; return result ; } , [ ] ) ; }
returns an array of vectors as an array of arrays
@example
const vectors = [ [1,2,3], [1,2,3], [3,3,4], [3,3,3] ];
const arrays = pivotVector(vectors); // => [ [1,2,3,3], [2,2,3,3], [3,3,4,3] ];
@memberOf util
@param {Array[]} vectors
@returns {Array[]}
returns an array of vectors as an array of arrays