summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/qfunctionconfigurator.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-01 11:16:57 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-01 13:01:19 +0200
commit891f5d68a5bc8bdd565f13cd38160948d8a7fb6a (patch)
treef16317fbc75d620dd295daef3cfae4b5d18708c4 /qfunctionconfigurator/qfunctionconfigurator.cpp
parentf4693222160f1705107e701bd832e5433cd0d6bb (diff)
qfc: adapt step size to bound
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.cpp')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp2
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) {