From 891f5d68a5bc8bdd565f13cd38160948d8a7fb6a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 1 Jul 2015 11:16:57 +0200 Subject: qfc: adapt step size to bound --- qfunctionconfigurator/qfunctionconfigurator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qfunctionconfigurator') 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) { -- cgit v1.2.3