mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[apps/shared/cartesian_function] Function symbol depends on its plot type
This commit is contained in:
committed by
Léa Saviot
parent
a2dcad069f
commit
ee1cdea837
@@ -78,11 +78,25 @@ int CartesianFunction::derivativeNameWithArgument(char * buffer, size_t bufferSi
|
||||
return numberOfChars + derivativeSize;
|
||||
}
|
||||
|
||||
CodePoint CartesianFunction::symbol() const {
|
||||
switch (plotType()) {
|
||||
case PlotType::Cartesian:
|
||||
return 'x';
|
||||
case PlotType::Polar:
|
||||
return UCodePointGreekSmallLetterTheta;
|
||||
default:
|
||||
assert(plotType() == PlotType::Parametric);
|
||||
return 't';
|
||||
}
|
||||
}
|
||||
|
||||
CartesianFunction::PlotType CartesianFunction::plotType() const {
|
||||
return recordData()->plotType();
|
||||
}
|
||||
|
||||
void CartesianFunction::setPlotType(PlotType plotType) {
|
||||
/* Reset memoized layout. */
|
||||
m_model.tidy();
|
||||
return recordData()->setPlotType(plotType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user