-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fixes bugs in findStopLessThanOrEqualTo algorithm #8134
Conversation
- When the input > all stops it returned the second-last stop, should have been the last stop. ``` findStopLessThanOrEqualTo([0, 1, 2, 3, 4, 5, 6, 7, ], 8) // 6 but should have been 7 ``` - When more than one stop had the same value it didn't always return the last stop ``` findStopLessThanOrEqualTo([0.5, 0.5], 0.5) // 0 but should have been 1 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks for the fix! Can you cover the new behavior with some tests?
I have made the changes and wrote some tests. let me know how the changes look. |
@mourner have you been able to look at the changes I've made? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me. Thanks! 🎉
Old behaviour
New behaviour
Launch Checklist
@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changes@mapbox/gl-native
if this PR includes shader changes or needs a native port