[apps/graph] Evaluation methods renaming

This commit is contained in:
Léa Saviot
2019-08-28 16:56:49 +02:00
parent 28a721e96e
commit c71ef7ff79
22 changed files with 94 additions and 109 deletions

View File

@@ -107,7 +107,7 @@ InteractiveCurveViewRangeDelegate::Range FunctionGraphController::computeYRange(
const int balancedBound = std::floor((tMax-tMin)/2/step);
for (int j = -balancedBound; j <= balancedBound ; j++) {
float t = (tMin+tMax)/2 + step * j;
Coordinate2D<float> xy = f->evaluateAtParameter(t, context);
Coordinate2D<float> xy = f->evaluate2DAtParameter(t, context);
float x = xy.x();
if (!std::isnan(x) && !std::isinf(x) && x >= xMin && x <= xMax) {
float y = xy.y();
@@ -139,7 +139,7 @@ void FunctionGraphController::initCursorParameters() {
Coordinate2D<double> xy;
do {
ExpiringPointer<Function> firstFunction = functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(functionIndex++));
xy = firstFunction->evaluateAtParameter(t, context);
xy = firstFunction->evaluate2DAtParameter(t, context);
} while ((std::isnan(xy.y()) || std::isinf(xy.y())) && functionIndex < functionStore()->numberOfActiveFunctions());
m_cursor->moveTo(t, xy.x(), xy.y());
functionIndex = (std::isnan(xy.y()) || std::isinf(xy.y())) ? 0 : functionIndex - 1;
@@ -181,7 +181,7 @@ bool FunctionGraphController::closestCurveIndexIsSuitable(int newIndex, int curr
}
Coordinate2D<double> FunctionGraphController::xyValues(int curveIndex, double t, Poincare::Context * context) const {
return functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(curveIndex))->evaluateAtParameter(t, context);
return functionStore()->modelForRecord(functionStore()->activeRecordAtIndex(curveIndex))->evaluate2DAtParameter(t, context);
}
int FunctionGraphController::numberOfCurves() const {