[apps] Graph: create a RootGraphController

This commit is contained in:
Émilie Feral
2018-01-19 17:19:45 +01:00
committed by EmilieNumworks
parent d1840dfe17
commit 37c3f6189d
5 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
#include "root_graph_controller.h"
#include "../app.h"
using namespace Shared;
using namespace Poincare;
namespace Graph {
RootGraphController::RootGraphController(Responder * parentResponder, GraphView * graphView, BannerView * bannerView, Shared::InteractiveCurveViewRange * curveViewRange, CurveViewCursor * cursor) :
CalculationGraphController(parentResponder, graphView, bannerView, curveViewRange, cursor, I18n::Message::NoZeroFound)
{
}
const char * RootGraphController::title() {
return I18n::translate(I18n::Message::Zeros);
}
CartesianFunction::Point RootGraphController::computeNewPointOfInterest(double start, double step, double max, Context * context) {
return {.abscissa = m_function->nextRootFrom(start, step, max, context), .value = 0.0};
}
}