1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-30 18:00:01 +02:00
This commit is contained in:
Justin Lin
2022-04-17 19:53:21 +08:00
parent eb96b767d4
commit 92190fbb21
2 changed files with 6 additions and 6 deletions

View File

@@ -35,10 +35,10 @@ function _add(buckets, bucket, i_elem, b_idx) =
function before_after(lt, pivot, leng, before = [], after = [], j = 1) =
j == leng ? [before, after] :
let(cond = lt[j][0] < pivot[0])
let(is_less = lt[j][0] < pivot[0])
before_after(lt, pivot, leng,
cond ? [each before, lt[j]] : before,
cond ? after : [each after, lt[j]],
is_less ? [each before, lt[j]] : before,
is_less ? after : [each after, lt[j]],
j + 1
);

View File

@@ -1,9 +1,9 @@
function before_after(lt, pivot, less, leng, before = [], after = [], j = 1) =
j == leng ? [before, after] :
let(cond = less(lt[j], pivot))
let(is_less = less(lt[j], pivot))
before_after(lt, pivot, less, leng,
cond ? [each before, lt[j]] : before,
cond ? after : [each after, lt[j]],
is_less ? [each before, lt[j]] : before,
is_less ? after : [each after, lt[j]],
j + 1
);