For #985: use round instead of floor for highestVisibleXIndex #1000
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For #985:
I had regression on my side:
pt.x now is 25.0, if we print it, but in the memory, it looks like 24.999999993, so floor(pt.x) would be 24, while it should be 25.0?
So I checked #785, #794, I think they are ONLY related to lowestVisibleXIndex, because old code has "+1" appended. The latest code removed +1.
However, I think highestVisibleXIndex should stick to round as mentioned above.
@danielgindi did you meet any out of range issue because of using round? e.g. round(25.6) -> 26 while it should be 25.
This is kind of tricky, and we may want to review this carefully.
If you need a gitter chat, let me know