mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
use median in bt_tree
This commit is contained in:
parent
247939fec6
commit
814975afaf
1 changed files with 1 additions and 1 deletions
|
@ -494,7 +494,7 @@ function _bt_tree(points, ind, leafsize=25) =
|
|||
pmc = mean(projc),
|
||||
pivot = min_index([for(p=projc) abs(p-pmc)]),
|
||||
radius = max([for(i=ind) norm(points[ind[pivot]]-points[i]) ]),
|
||||
median = mean(projc),
|
||||
median = median(projc),
|
||||
Lind = [for(i=idx(ind)) if(projc[i]<=median && i!=pivot) ind[i] ],
|
||||
Rind = [for(i=idx(ind)) if(projc[i] >median && i!=pivot) ind[i] ]
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue