From ee9b198036487ac7d6453d7bb81d51497a7eb230 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sun, 15 May 2022 10:17:52 +0800 Subject: [PATCH] re-org var --- src/matrix/m_replace.scad | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/matrix/m_replace.scad b/src/matrix/m_replace.scad index fbc7dd32..fb838355 100644 --- a/src/matrix/m_replace.scad +++ b/src/matrix/m_replace.scad @@ -1,16 +1,14 @@ function m_replace(m, x, y, value) = let( rowY = m[y], - leng_rowY = len(rowY), newRowY = [ - for(i = [0:leng_rowY - 1]) + for(i = [0:len(rowY) - 1]) if(i == x) value else rowY[i] - ], - row_leng = len(m) + ] ) [ - for(i = [0:row_leng - 1]) + for(i = [0:len(m) - 1]) if(i == y) newRowY else m[i] ];