flatworld.generalUtils.arrays Class
Array manipulation
Item Index
Methods
Methods
chunkArray
(
-
array
-
chunksize
This function takes an array and slices it to proper chunks.
Parameters:
-
array
ArrayThe array to be chunked
-
chunksize
Integersize of the chunks from: http://stackoverflow.com/a/34847417/1523545
flatten2Levels
(
Array
-
arr
Flattern 2 levels deep, 2-dimensional arrays. Credits: http://stackoverflow.com/a/15030117/1523545
Parameters:
-
arr
ArrayArray to flatten
Returns:
Array:
Flattened array