From b34bb2dc35e2d11bd6473a75356a49303bbeb556 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 26 Jul 2015 10:51:08 +0200 Subject: qfc: we need positive retval here --- qfunctionconfigurator/functionconfig.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qfunctionconfigurator') diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp index 825aa3c1..b4806e19 100644 --- a/qfunctionconfigurator/functionconfig.cpp +++ b/qfunctionconfigurator/functionconfig.cpp @@ -30,9 +30,9 @@ Map::num Map::getValue(Map::num x) { num yi = getValueInternal(xi); num yiplus1 = getValueInternal(xi + (x < 0 ? -1 : 1)); num f = (q-xi); - num ret = yiplus1 * f + yi * (1.0f - f); // at least do a linear interpolation. - last_input_value.setX(x); - last_input_value.setY(ret); + num ret = yiplus1 * f + yi * (1 - f); // at least do a linear interpolation. + last_input_value.setX(std::abs(x)); + last_input_value.setY(std::abs(ret)); return ret; } -- cgit v1.2.3