Simplify points notation
emersion opened this issue · comments
Simon Ser commented
Now, to add a point, you have to do:
tree.insert([20, 40, 20, 40]);
It would be simplier to do:
tree.insert([20, 40]);
What do you think?
Volodymyr Agafonkin commented
You can do this now by specifying format as ['[0]', '[1]', '[0]', '[1]']
.
Simon Ser commented
You mean, tree.insert([20, 40, '[0]', '[1]']);
inserts a point at 20,40?
Volodymyr Agafonkin commented
No, I mean:
var tree = rbush(9, ['[0]', '[1]', '[0]', '[1]']);
tree.insert([20, 40]);
Simon Ser commented
Oh, thanks!