[apps/graph] Fix yAuto for cartesian functions

Scenario: display f(x) = x
This commit is contained in:
Léa Saviot
2019-09-03 15:27:33 +02:00
parent 7ff8fdf44f
commit e7958b8287

View File

@@ -51,7 +51,7 @@ public:
double tMax() const override;
void setTMin(double tMin);
void setTMax(double tMax);
float rangeStep() const override { return (tMax() - tMin())/k_polarParamRangeSearchNumberOfPoints; }
float rangeStep() const override { return plotType() == PlotType::Cartesian ? NAN : (tMax() - tMin())/k_polarParamRangeSearchNumberOfPoints; }
private:
constexpr static float k_polarParamRangeSearchNumberOfPoints = 100.0f; // This is ad hoc, no special justification