From 34b4dd761b38788ebe31e606d5eb1dff0ccb639a Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 23 Apr 2021 20:53:43 +0800 Subject: [PATCH] delete variable --- src/experimental/_impl/_tiles_wfc_impl.scad | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/experimental/_impl/_tiles_wfc_impl.scad b/src/experimental/_impl/_tiles_wfc_impl.scad index 199fbbcd..c4d35244 100644 --- a/src/experimental/_impl/_tiles_wfc_impl.scad +++ b/src/experimental/_impl/_tiles_wfc_impl.scad @@ -83,10 +83,9 @@ function wf_collapse(wf, x, y) = [state, w] ], totalWeights = _totalWeights(weights_xy, len(weights_xy)), - threshold = rand() * totalWeights, - states_weights = weights_xy + threshold = rand() * totalWeights ) - _wf_collapse(wf, x, y, states_weights, len(states_weights), threshold); + _wf_collapse(wf, x, y, weights_xy, len(weights_xy), threshold); function _totalWeights(weights_xy, leng, i = 0) = i == leng ? 0 :