[apps/graph] Step for polar and cartesian is definitionDomain/96.0

This commit is contained in:
Léa Saviot
2019-08-30 11:44:53 +02:00
parent 67e5114194
commit 66ef85239d
2 changed files with 4 additions and 4 deletions

View File

@@ -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<double> xy = function->evaluateXYAtParameter(t, App::app()->localContext());

View File

@@ -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;
};
}