mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 08:47:28 +01:00
[apps/shared/cartesian_function] Add static ParameterMessageForPlotType method
This commit is contained in:
@@ -95,15 +95,7 @@ Poincare::Expression CartesianFunction::expressionReduced(Poincare::Context * co
|
||||
}
|
||||
|
||||
I18n::Message CartesianFunction::parameterMessageName() const {
|
||||
PlotType type = plotType();
|
||||
if (type == PlotType::Cartesian) {
|
||||
return I18n::Message::X;
|
||||
}
|
||||
if (type == PlotType::Polar) {
|
||||
return I18n::Message::Theta;
|
||||
}
|
||||
assert(plotType() == PlotType::Parametric);
|
||||
return I18n::Message::T;
|
||||
return ParameterMessageForPlotType(plotType());
|
||||
}
|
||||
|
||||
CodePoint CartesianFunction::symbol() const {
|
||||
@@ -161,6 +153,17 @@ void CartesianFunction::setPlotType(PlotType newPlotType) {
|
||||
}
|
||||
}
|
||||
|
||||
I18n::Message CartesianFunction::ParameterMessageForPlotType(PlotType plotType) {
|
||||
if (plotType == PlotType::Cartesian) {
|
||||
return I18n::Message::X;
|
||||
}
|
||||
if (plotType == PlotType::Polar) {
|
||||
return I18n::Message::Theta;
|
||||
}
|
||||
assert(plotType == PlotType::Parametric);
|
||||
return I18n::Message::T;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Poincare::Coordinate2D<T> CartesianFunction::privateEvaluateXYAtParameter(T t, Poincare::Context * context) const {
|
||||
Coordinate2D<T> x1x2 = templatedApproximateAtParameter(t, context);
|
||||
|
||||
Reference in New Issue
Block a user