1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-10 16:54:23 +02:00

fix rc error

This commit is contained in:
Justin Lin
2022-03-16 09:15:25 +08:00
parent 9a1ac9a363
commit deb875b147

View File

@@ -15,16 +15,14 @@ function mz_square_cells(rows, columns, start = [0, 0], init_cells, x_wrapping =
let(
init_undef = is_undef(init_cells),
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells,
rc = init_undef ?
[rows, columns] :
let(r = len([for(cell = mz) if(cell.y == 0) undef]))
[r, len(mz) - r]
r = len([for(cell = mz) if(cell.x == 0) undef]),
c = len([for(cell = mz) if(cell.y == 0) undef])
)
go_maze(
start.x,
start.y,
mz,
rc[0], rc[1],
r, c,
x_wrapping,
y_wrapping,
seed