From cf3251730226e68502f6aaf0d8417ea0956cc6d3 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sun, 15 May 2022 10:20:20 +0800 Subject: [PATCH] re-org var --- src/util/swap.scad | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/swap.scad b/src/util/swap.scad index 1e3bca8c..143af418 100644 --- a/src/util/swap.scad +++ b/src/util/swap.scad @@ -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]