From 8f2b9c4ef1977147a3ce7f2a75f23c60083976df Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Sun, 26 May 2019 23:18:49 -0700 Subject: [PATCH] Optimized various array functions. --- arrays.scad | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arrays.scad b/arrays.scad index 0371036..bd0ec5e 100644 --- a/arrays.scad +++ b/arrays.scad @@ -98,7 +98,6 @@ function slice(arr,st,end) = let( // select(l, [1,3]); // Returns [4,6] function select(list, start, end=undef) = let(l=len(list)) - (list==[])? [] : end==undef? ( is_num(start)? let(s=(start%l+l)%l) list[s] : @@ -203,7 +202,7 @@ function list_longest(vecs) = // minlen = The minimum length to pad the list to. // fill = The value to pad the list with. function list_pad(v, minlen, fill=undef) = - let(l=len(v)) [for (i=[0:1:max(l,minlen)-1]) i