diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-01 11:16:57 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-01 13:01:19 +0200 |
commit | 891f5d68a5bc8bdd565f13cd38160948d8a7fb6a (patch) | |
tree | f16317fbc75d620dd295daef3cfae4b5d18708c4 /qfunctionconfigurator | |
parent | f4693222160f1705107e701bd832e5433cd0d6bb (diff) |
qfc: adapt step size to bound
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp index c1f11ffa..b230cfb1 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.cpp +++ b/qfunctionconfigurator/qfunctionconfigurator.cpp @@ -131,8 +131,8 @@ void QFunctionConfigurator::drawFunction() QPen pen(spline_color, 1.2, Qt::SolidLine); - static constexpr double step = 1.02; const double max = _config->maxInput(); + const double step = std::max(.1, max / 300.); QPointF prev = point_to_pixel(QPointF(0, 0)); for (double i = 0; i < max; i += step) { |