summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/functionconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qfunctionconfigurator/functionconfig.cpp')
-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;
}