summaryrefslogtreecommitdiffhomepage
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
parent149870c9707600fc229e8a923f01f66be5077492 (diff)
compat/slider: try avoid rounding some more
-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