summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-26 10:51:08 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-26 10:57:49 +0200
commitb34bb2dc35e2d11bd6473a75356a49303bbeb556 (patch)
tree550a58b992dd54728c765314783f81dd3eb0381d
parent21c2135588a6a76b6dcc4defc6e64a3d9032db59 (diff)
qfc: we need positive retval here
-rw-r--r--qfunctionconfigurator/functionconfig.cpp6
1 files changed, 3 insertions, 3 deletions
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;
}