mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/function] Factorize zoom in Function class
The new zoom implemented for ContinuousFunction is now factorized inside Function to benefit the Sequence class. The same things is done to code added to Graph::GraphController, which is moved into FunctionGraphController. This removes the reimplementation of several methods, most notably computeYRange, as the implementation for function is general enough to work on sequences. Change-Id: I9b8211354064f46c3fa3dde3191dcb39d627a1d2
This commit is contained in:
committed by
Émilie Feral
parent
33f9bb50a3
commit
a6db9688cd
@@ -53,6 +53,10 @@ public:
|
||||
virtual Poincare::Coordinate2D<float> evaluateXYAtParameter(float t, Poincare::Context * context) const = 0;
|
||||
virtual Poincare::Coordinate2D<double> evaluateXYAtParameter(double t, Poincare::Context * context) const = 0;
|
||||
virtual Poincare::Expression sumBetweenBounds(double start, double end, Poincare::Context * context) const = 0;
|
||||
|
||||
// Range
|
||||
virtual void rangeForDisplay(float * xMin, float * xMax, float * yMin, float * yMax, Poincare::Context * context, bool tuneXRange = true) const;
|
||||
|
||||
protected:
|
||||
/* RecordDataBuffer is the layout of the data buffer of Record
|
||||
* representing a Function. We want to avoid padding which would:
|
||||
@@ -88,7 +92,12 @@ protected:
|
||||
#endif
|
||||
bool m_active;
|
||||
};
|
||||
|
||||
void protectedRefinedYRangeForDisplay(float xMin, float xMax, float * yMin, float * yMax, Poincare::Context * context, bool boundByMagnitude) const;
|
||||
|
||||
private:
|
||||
virtual void refinedYRangeForDisplay(float xMin, float xMax, float * yMin, float * yMax, Poincare::Context * context) const = 0;
|
||||
|
||||
RecordDataBuffer * recordData() const;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user