mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 21:58:27 +01:00
Optimized transpose() slightly.
This commit is contained in:
parent
8f2b9c4ef1
commit
9a860c53ef
@ -505,7 +505,6 @@ function array_dim(v, depth=undef) =
|
||||
// Example:
|
||||
// transpose([3,4,5]); // Returns: [3,4,5]
|
||||
function transpose(arr) =
|
||||
arr==[]? [] :
|
||||
is_list(arr[0])? [for (i=[0:1:len(arr[0])-1]) [for (j=[0:1:len(arr)-1]) arr[j][i]]] : arr;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user