mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[poincare/zoom] Fix array overflow
This commit is contained in:
committed by
EmilieNumworks
parent
89979b4f50
commit
55f21f127c
@@ -317,7 +317,7 @@ void Zoom::RangeWithRatioForDisplay(ValueAtAbscissa evaluation, float yxRatio, f
|
||||
* X axis. Conversely, very flat functions may only take a small portion of
|
||||
* the Y range. In those cases, the ratio is not suitable. */
|
||||
if (bestBreadth < minimalXCoverage * sampleSize
|
||||
|| sample[bestIndex + bestBreadth] - sample[bestIndex] < minimalYCoverage * yRange) {
|
||||
|| sample[bestIndex + bestBreadth - 1] - sample[bestIndex] < minimalYCoverage * yRange) {
|
||||
*xMin = NAN;
|
||||
*xMax = NAN;
|
||||
*yMin = NAN;
|
||||
|
||||
Reference in New Issue
Block a user