summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-08 07:06:29 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-10-08 07:07:05 +0200
commit80525e48bce10a629db7706fe1dc31c2e0402354 (patch)
tree5e2cf5f0269571c0caedafdb2bdf8f70c777dd07 /qfunctionconfigurator/functionconfig.cpp
parent5441b2a60627406f3c235864c126a31e87234259 (diff)
qfc: save retval's absolute value
Closes #249
Diffstat (limited to 'qfunctionconfigurator/functionconfig.cpp')
-rw-r--r--qfunctionconfigurator/functionconfig.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp
index 594607ff..33f9beee 100644
--- a/qfunctionconfigurator/functionconfig.cpp
+++ b/qfunctionconfigurator/functionconfig.cpp
@@ -31,8 +31,8 @@ float Map::getValue(float x) {
float yiplus1 = getValueInternal(xi+1);
float f = (q-xi);
float ret = yiplus1 * f + yi * (1.0f - f); // at least do a linear interpolation.
- last_input_value.setX(x);
- last_input_value.setY(ret);
+ last_input_value.setX(std::fabs(x));
+ last_input_value.setY(std::fabs(ret));
return ret;
}