1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 04:51:26 +02:00

fix end condition

This commit is contained in:
Justin Lin
2022-03-18 19:31:48 +08:00
parent 39c1c1a9db
commit 679b0d0fc2

View File

@@ -61,11 +61,12 @@ function nxtp(dotM, p) = p + _mz_hamiltonian_nxt_offset[_mz_hamiltonian_dir(_mz_
function _mz_hamiltonian_travel(dotM, p, leng, i = 0) =
let(
end = leng - 1,
pts = [
for(i = 0, nxt_p = nxtp(dotM, p), is_continue = i < leng;
for(i = 0, nxt_p = nxtp(dotM, p), is_continue = i < end;
is_continue;
i = i + 1,
is_continue = i < leng,
is_continue = i < end,
nxt_p = is_continue ? nxtp(dotM, nxt_p) : undef
)
nxt_p