summaryrefslogtreecommitdiffhomepage
path: root/opentrack-compat/slider.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-31 10:25:19 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-31 10:25:24 +0200
commit30f65d15688a3ba02689b8a4e7fccd8baaaf82e9 (patch)
tree6666ab19b18fcb76da1458f625c18071febc72b7 /opentrack-compat/slider.cpp
parent149870c9707600fc229e8a923f01f66be5077492 (diff)
compat/slider: try avoid rounding some more
Diffstat (limited to 'opentrack-compat/slider.cpp')
-rw-r--r--opentrack-compat/slider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/opentrack-compat/slider.cpp b/opentrack-compat/slider.cpp
index fca591a1..b491dd56 100644
--- a/opentrack-compat/slider.cpp
+++ b/opentrack-compat/slider.cpp
@@ -66,7 +66,7 @@ int slider_value::to_slider_pos(int q_min, int q_max) const
{
const int q_diff = q_max - q_min;
- return int(std::round(((cur() - min()) * q_diff / (max() - min())) + q_min));
+ return int(std::round(((cur() - min() * q_diff) / (max() - min())) + q_min));
}
} // end ns options