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

Missing functions for binary searches #12558

Closed
poke1024 opened this issue Nov 1, 2017 · 2 comments
Closed

Missing functions for binary searches #12558

poke1024 opened this issue Nov 1, 2017 · 2 comments

Comments

@poke1024
Copy link
Contributor

poke1024 commented Nov 1, 2017

I'm missing some function for doing binary searches on arrays in GDScript.

Now, I'd add one, only there needs to be some discussion how and where. Should it be:

(1) a builtin GDScript function like clamp and max?
(2) an extension of Array? But that's a core extension and the core must stay minimal.
(3) some kind of utils package that people can use, like Python's bisect package

My personal favorite would be adding a bisect_left and bisect_right to Array.

@akien-mga
Copy link
Member

I think it should be added to Array.

@poke1024
Copy link
Contributor Author

Merged now.

@akien-mga akien-mga added this to the 3.0 milestone Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants