1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-16 13:50:05 +01:00

i is not required

This commit is contained in:
Justin Lin 2022-08-31 10:06:41 +08:00
parent 264d83cdf1
commit ca7a0e7ef1

View File

@ -27,7 +27,7 @@ function _join(str_lt) =
function c_or_v(c, v, rules, rules_pr, leng, seed, ci, i = 0) =
i == leng ? c :
let(idx = search([v[i]], rules, num_returns_per_match=0, index_col_num = 1)[0][0])
rand(0, 1, seed + ci + i) <= rules_pr[idx] ? v[i] : c_or_v(c, v, rules, rules_pr, leng, seed, ci, i + 1);
rand(0, 1, seed + ci) <= rules_pr[idx] ? v[i] : c_or_v(c, v, rules, rules_pr, leng, seed, ci, i + 1);
function _derive1_p(base, rules, rules_pr, seed) =
_join([