From 2f20b8fe504655394c59bca815cfae263a67555b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 23 Nov 2023 10:42:51 +0100 Subject: spline: switch back to using double precision --- spline/spline.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'spline/spline.hpp') diff --git a/spline/spline.hpp b/spline/spline.hpp index 1098ed6c..780442b9 100644 --- a/spline/spline.hpp +++ b/spline/spline.hpp @@ -105,8 +105,7 @@ struct OTR_SPLINE_EXPORT base_spline : base_spline_, spline_modify_mixin, spline class OTR_SPLINE_EXPORT spline : public base_spline { - using f = float; - // todo change to double + using f = double; double bucket_size_coefficient(const QList& points) const; void update_interp_data() const; @@ -126,13 +125,13 @@ class OTR_SPLINE_EXPORT spline : public base_spline std::shared_ptr ctx { std::make_shared() }; mutable QPointF last_input_value{-1, -1}; - mutable std::vector data = std::vector(value_count, magic_fill_value); + mutable std::vector data = std::vector(value_count, magic_fill_value); mutable points_t points; mutable axis_opts::max_clamp clamp_x = axis_opts::x1000, clamp_y = axis_opts::x1000; mutable bool activep = false; static constexpr unsigned value_count = 8192; - static constexpr float magic_fill_value = -(1 << 24) + 1; + static constexpr f magic_fill_value = -(1 << 24) + 1; static constexpr double c_interp = 5; public: -- cgit v1.2.3