[poincare/zoom] Reduce zoom artifact

Do not use the bounds of the interval when computing a refined range.
As the bounds are often integers, the zoom would give strange result on
some non-continuous functions (e.g. f(x) = x!).

Change-Id: Ie127fe15191cb3951cff223adc8dc3172188c789
This commit is contained in:
Gabriel Ozouf
2020-11-13 10:36:02 +01:00
committed by EmilieNumworks
parent a418602763
commit adf28345b1

View File

@@ -183,7 +183,7 @@ void Zoom::RefinedYRangeForDisplay(ValueAtAbscissa evaluation, float xMin, float
float sum = 0.f;
int pop = 0;
for (int i = 1; i < sampleSize; i++) {
for (int i = 1; i < sampleSize - 1; i++) {
x = xMin + i * step;
y = evaluation(x, context, auxiliary);
if (!std::isfinite(y)) {