-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Closed
Copy link
Labels
Description
Issue:
Calling GetNearest() on any of the ScatterSources types will always crash for any input data except if
you manually set MaxRenderIndex to something at least 2 less than the number of actual points (this has other side effects so is only a temp work around which can be mitigated by adding dummy points).
I believe the issue is that the upper bounds on these for loops need to be exclusive not inclusive:
| for (int i2 = 0; i2 <= RenderIndexCount; i2++) |
| for (int i2 = 0; i2 <= RenderIndexCount; i2++) |
| for (int i2 = 0; i2 <= RenderIndexCount; i2++) |
| for (int i2 = 0; i2 <= RenderIndexCount; i2++) |
ScottPlot Version: 5.0.24
Code Sample:
new ScatterSourceDoubleArray(Array.Empty<double>(), Array.Empty<double>()).GetNearest(default, default);Reactions are currently unavailable