diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-16 17:42:46 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-16 17:54:12 +0200 |
commit | d42019e4d15ff62926b1a98b45a0fcd154567620 (patch) | |
tree | 45932be0a093af0df689cc490219734bb234dec3 /options/slider.hpp | |
parent | 190ec92ac66c4b2c44d692be9b861ec98853355a (diff) |
options/slider: use double precision
Made Accela slider inaccurate.
Diffstat (limited to 'options/slider.hpp')
-rw-r--r-- | options/slider.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/options/slider.hpp b/options/slider.hpp index de5937d2..dff841c6 100644 --- a/options/slider.hpp +++ b/options/slider.hpp @@ -16,21 +16,21 @@ namespace options { class OPENTRACK_OPTIONS_EXPORT slider_value final { - float cur_, min_, max_; + double cur_, min_, max_; public: slider_value(float cur, float min, float max); template<typename t, typename u, typename v> slider_value(t cur, u min, v max) : - cur_(float(cur)), - min_(float(min)), - max_(float(max)) + cur_(double(cur)), + min_(double(min)), + max_(double(max)) {} slider_value(const slider_value& v); slider_value(); slider_value& operator=(const slider_value& v); bool operator==(const slider_value& v) const; - operator float() const { return cur_; } + operator double() const { return cur_; } double cur() const { return double(cur_); } double min() const { return double(min_); } double max() const { return double(max_); } |