mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Optimized transpose() slightly.
This commit is contained in:
parent
8f2b9c4ef1
commit
9a860c53ef
1 changed files with 0 additions and 1 deletions
|
@ -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…
Reference in a new issue