aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv_qt.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-14 16:11:02 +0100
committerDavid Robillard <d@drobilla.net>2020-12-14 16:11:02 +0100
commit778ff7201a2e3fcc9409f91ee83f2e8a962debf9 (patch)
tree26905f47d1d2c71db810513a7035286566d7ff8c /src/jalv_qt.cpp
parent729fe9275b4c35372007d2e1af9a86d9c9589eab (diff)
downloadjalv-778ff7201a2e3fcc9409f91ee83f2e8a962debf9.tar.gz
jalv-778ff7201a2e3fcc9409f91ee83f2e8a962debf9.tar.bz2
jalv-778ff7201a2e3fcc9409f91ee83f2e8a962debf9.zip
Use the appropriate math functions for the operand precision
Diffstat (limited to 'src/jalv_qt.cpp')
-rw-r--r--src/jalv_qt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp
index c05391c..b3b5a38 100644
--- a/src/jalv_qt.cpp
+++ b/src/jalv_qt.cpp
@@ -522,7 +522,7 @@ Control::setValue(float value)
step = (std::find(scalePoints.begin(), scalePoints.end(), value)
- scalePoints.begin());
} else if (isLogarithmic) {
- step = steps * log(value / min) / log(max / min);
+ step = steps * logf(value / min) / logf(max / min);
} else {
step = value * steps;
}
@@ -575,7 +575,7 @@ Control::getValue()
} else if (isInteger) {
return dial->value();
} else if (isLogarithmic) {
- return min * pow(max / min, (float)dial->value() / (steps - 1));
+ return min * powf(max / min, (float)dial->value() / (steps - 1));
} else {
return (float)dial->value() / steps;
}