diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-08 07:06:29 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-10-08 07:07:05 +0200 |
commit | 80525e48bce10a629db7706fe1dc31c2e0402354 (patch) | |
tree | 5e2cf5f0269571c0caedafdb2bdf8f70c777dd07 | |
parent | 5441b2a60627406f3c235864c126a31e87234259 (diff) |
qfc: save retval's absolute value
Closes #249
-rw-r--r-- | qfunctionconfigurator/functionconfig.cpp | 4 |
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; } |