mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-01-16 13:50:23 +01:00
change to remove ninther
This commit is contained in:
parent
9e4d46eecf
commit
247939fec6
@ -1249,7 +1249,8 @@ function group_sort(list, idx) =
|
||||
// small = list_smallest(list, k)
|
||||
// Description:
|
||||
// Returns a set of the k smallest items in list in arbitrary order. The items must be
|
||||
// mutually comparable with native OpenSCAD comparison operations.
|
||||
// mutually comparable with native OpenSCAD comparison operations. You will get "undefined operation"
|
||||
// errors if you provide invalid input.
|
||||
// Arguments:
|
||||
// list = list to process
|
||||
// k = number of items to return
|
||||
|
@ -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 = ninther(projc),
|
||||
median = mean(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…
x
Reference in New Issue
Block a user