I arrived to a similar one but 2X faster. But I still need to deal with arrays containing 0.0, and the heap usage is the same due to the point2 array.
This one is around 35% faster. ( fn LimitArray arr limit = ( if limit < arr.count and limit != 0 do ( tmp = sort (deepcopy arr) …
Ok, since the rules changed significantly, here is a modified version of my previous algorithm, which is a lot slower. How does it performs for you D…
And here is the test array: ( /* Build test array ———————————– */ gc() seed 0 arr = for j = 1 to 15000 collect random -1…
Here is my version, but as Denis stated there will be “not unique” numbers, it won’t work. fn LimitArray arr limit = ( if limit < arr.count and l…
Is that the time to build the test array or to process it with the algorithm you propose? I was asking for the time it takes to process the array with…
denisT: There are some rules I forgot to say: #1 The order is matter. It has to stay the same. #2 The array can be not unique. It has to stay the …
Nice that you included the 0.0 in the example. What time do you get for this ? ( seed 0 limit = 5000 arr = for j = 1 to 15000 collect random -…
denisT: But we can change the triangle 2 to different order – [4,3,2] for example. That would also flip the face normal. ( obj = converttomesh…
vector = [1,0,0] <node>.dir = vector
You first have to create the array in order to then add items to it. pos_array = #() look_array = #() append pos_array point_1 append look_array poi…
Try: <control>.DropDownHeight <control>.DropDownHeight = (<control>.Items.Count+1) * <control>.ItemHeight
gandhics: I guess I can control the interval number? Sure, you can use the one you define at rollout setup of modify it anytime later, as well as…
Does this work for what you need? ( try destroydialog ::RO_TEST catch() rollout RO_TEST “” width:200 height:200 ( timer clock “” interval:100 ac…
Well, that changes the things. Although I have to say it is an uncommon behavior what you are seeking (IMO). I’ve never seen such a behavior in a dial…