mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-11 09:14:29 +02:00
add m_transpose
This commit is contained in:
12
src/matrix/m_transpose.scad
Normal file
12
src/matrix/m_transpose.scad
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
function m_transpose(m) =
|
||||||
|
let(
|
||||||
|
column = len(m[0]),
|
||||||
|
row = len(m)
|
||||||
|
)
|
||||||
|
[
|
||||||
|
for(y = 0; y < column; y = y + 1)
|
||||||
|
[
|
||||||
|
for(x = 0; x < row; x = x + 1)
|
||||||
|
m[x][y]
|
||||||
|
]
|
||||||
|
];
|
Reference in New Issue
Block a user