[poincare/zoom] Remember points of interest when refining

Change-Id: I229cbffa2577d23bfa0a4c0632bc9ec32ae338e7
This commit is contained in:
Gabriel Ozouf
2020-11-19 11:31:41 +01:00
committed by EmilieNumworks
parent ca9cb63909
commit a418602763

View File

@@ -208,8 +208,8 @@ void Zoom::RefinedYRangeForDisplay(ValueAtAbscissa evaluation, float xMin, float
float bound = std::exp(sum / pop + 1.f);
sampleYMin = std::max(sampleYMin, - bound);
sampleYMax = std::min(sampleYMax, bound);
*yMin = sampleYMin;
*yMax = sampleYMax;
*yMin = std::min(*yMin, sampleYMin);
*yMax = std::max(*yMax, sampleYMax);
}
/* Round out the smallest bound to 0 if it is negligible compare to the
* other one. This way, we can display the X axis for positive functions such