[poincare/zoom] Remove tuneXRange argument

The ability to perform a range search without changing the X range was
only there to accomodate the Yauto feature.

Change-Id: I8c2b61b447fbd3dc1f4e303dff06d1a8d6e7a4f2
This commit is contained in:
Gabriel Ozouf
2020-10-08 11:56:21 +02:00
committed by Émilie Feral
parent 07c52139b9
commit ad6edffc07
9 changed files with 32 additions and 41 deletions

View File

@@ -79,7 +79,7 @@ Function::RecordDataBuffer * Function::recordData() const {
return reinterpret_cast<RecordDataBuffer *>(const_cast<void *>(d.buffer));
}
void Function::protectedRangeForDisplay(float * xMin, float * xMax, float * yMin, float * yMax, Poincare::Context * context, bool tuneXRange, bool boundByMagnitude) const {
void Function::protectedRangeForDisplay(float * xMin, float * xMax, float * yMin, float * yMax, Poincare::Context * context, bool boundByMagnitude) const {
Zoom::ValueAtAbscissa evaluation = [](float x, Context * context, const void * auxiliary) {
/* When evaluating sin(x)/x close to zero using the standard sine function,
* one can detect small variations, while the cardinal sine is supposed to be
@@ -89,7 +89,7 @@ void Function::protectedRangeForDisplay(float * xMin, float * xMax, float * yMin
constexpr float precision = 1e-5;
return precision * std::round(static_cast<const Function *>(auxiliary)->evaluateXYAtParameter(x, context).x2() / precision);
};
Zoom::InterestingRangesForDisplay(evaluation, xMin, xMax, yMin, yMax, tMin(), tMax(), context, this, tuneXRange);
Zoom::InterestingRangesForDisplay(evaluation, xMin, xMax, yMin, yMax, tMin(), tMax(), context, this);
evaluation = [](float x, Context * context, const void * auxiliary) {
return static_cast<const Function *>(auxiliary)->evaluateXYAtParameter(x, context).x2();