diff --git a/apps/graph/graph/graph_controller_helper.cpp b/apps/graph/graph/graph_controller_helper.cpp index 5a9d64369..6d276e3d4 100644 --- a/apps/graph/graph/graph_controller_helper.cpp +++ b/apps/graph/graph/graph_controller_helper.cpp @@ -27,11 +27,9 @@ bool GraphControllerHelper::privateMoveCursorHorizontally(Shared::CurveViewCurso } if (type == CartesianFunction::PlotType::Cartesian) { t+= dir * range->xGridUnit()/numberOfStepsInGradUnit; - } else if (type == CartesianFunction::PlotType::Polar) { - t += dir; //TODO LEA delt } else { - assert(type == CartesianFunction::PlotType::Parametric); - t += dir; //TODO LEA delt + assert(type == CartesianFunction::PlotType::Polar || type == CartesianFunction::PlotType::Parametric); + t += dir * (tMax-tMin)/k_definitionDomainDivisor; } t = maxFloat(minFloat(t, tMax), tMin); // Stay inside the definition domain Coordinate2D xy = function->evaluateXYAtParameter(t, App::app()->localContext()); diff --git a/apps/graph/graph/graph_controller_helper.h b/apps/graph/graph/graph_controller_helper.h index 9b0ecedf7..2a143e76f 100644 --- a/apps/graph/graph/graph_controller_helper.h +++ b/apps/graph/graph/graph_controller_helper.h @@ -14,6 +14,8 @@ protected: bool privateMoveCursorHorizontally(Shared::CurveViewCursor * cursor, int direction, Shared::InteractiveCurveViewRange * range, int numberOfStepsInGradUnit, Ion::Storage::Record record); void reloadDerivativeInBannerViewForCursorOnFunction(Shared::CurveViewCursor * cursor, Ion::Storage::Record record); virtual BannerView * bannerView() = 0; +private: + static constexpr double k_definitionDomainDivisor = 96.0; }; }