[apps] Graph: add the maximum graph controller

This commit is contained in:
Émilie Feral
2018-01-17 10:34:21 +01:00
committed by EmilieNumworks
parent 6703fedf54
commit 6fecd091f4
6 changed files with 61 additions and 18 deletions

View File

@@ -97,4 +97,17 @@ CartesianFunction::Point MinimumGraphController::computeExtremum(double start, d
return m_function->nextMinimumFrom(start, step, max, context);
}
MaximumGraphController::MaximumGraphController(Responder * parentResponder, GraphView * graphView, BannerView * bannerView, Shared::InteractiveCurveViewRange * curveViewRange, Shared::CurveViewCursor * cursor) :
ExtremumGraphController(parentResponder, graphView, bannerView, curveViewRange, cursor, I18n::Message::NoMaximumFound)
{
}
const char * MaximumGraphController::title() {
return I18n::translate(I18n::Message::Maximum);
}
CartesianFunction::Point MaximumGraphController::computeExtremum(double start, double step, double max, Context * context) {
return m_function->nextMaximumFrom(start, step, max, context);
}
}