Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify points notation #36

Closed
emersion opened this issue Feb 26, 2016 · 4 comments
Closed

Simplify points notation #36

emersion opened this issue Feb 26, 2016 · 4 comments

Comments

@emersion
Copy link

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?

@mourner
Copy link
Owner

mourner commented Feb 26, 2016

You can do this now by specifying format as ['[0]', '[1]', '[0]', '[1]'].

@mourner mourner closed this as completed Feb 26, 2016
@emersion
Copy link
Author

You mean, tree.insert([20, 40, '[0]', '[1]']); inserts a point at 20,40?

@mourner
Copy link
Owner

mourner commented Feb 26, 2016

No, I mean:

var tree = rbush(9, ['[0]', '[1]', '[0]', '[1]']);
tree.insert([20, 40]);

@emersion
Copy link
Author

Oh, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants