1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 06:08:31 +01:00

re-org var

This commit is contained in:
Justin Lin 2022-05-15 10:20:20 +08:00
parent ee9b198036
commit cf32517302

View File

@ -11,13 +11,12 @@
function swap(lt, i, j) =
i == j ? lt :
let(
leng = len(lt),
ab = i < j ? [i, j] : [j, i],
a = ab[0],
b = ab[1]
)
[
for(i = [0:leng - 1])
for(i = [0:len(lt) - 1])
if(i == a) lt[b]
else if(i == b) lt[a]
else lt[i]