This function will scale any given 2-dimensional array this will be scaled, this will be scaled by a given factor. Inspired by Stackoverflow Answer
const arr: number[][] = [[1,4]]const factor: number = 2;// will return [[1,1,4,4]]const scaledArr: number[][] = scaleArrayByFactor(arr, factor);
if you want to scale multidimensional array, use a recursion as a wrapper.
@param {any[][]} arr Any 2-dimensional array to be scaled @param {number[][]} factor the factor to scale the given array.
@return {string[][]} returns the scaled array by factor.
Generated using TypeDoc
This function will scale any given 2-dimensional array this will be scaled, this will be scaled by a given factor. Inspired by Stackoverflow Answer
if you want to scale multidimensional array, use a recursion as a wrapper.
@param {any[][]} arr Any 2-dimensional array to be scaled @param {number[][]} factor the factor to scale the given array.
@return {string[][]} returns the scaled array by factor.