summaryrefslogtreecommitdiffhomepage
path: root/spline/spline.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'spline/spline.hpp')
-rw-r--r--spline/spline.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/spline/spline.hpp b/spline/spline.hpp
index e4f64069..780442b9 100644
--- a/spline/spline.hpp
+++ b/spline/spline.hpp
@@ -105,12 +105,12 @@ struct OTR_SPLINE_EXPORT base_spline : base_spline_, spline_modify_mixin, spline
class OTR_SPLINE_EXPORT spline : public base_spline
{
- using f = float;
+ using f = double;
double bucket_size_coefficient(const QList<QPointF>& points) const;
void update_interp_data() const;
double get_value_internal(int x) const;
- static bool sort_fn(const QPointF& one, const QPointF& two);
+ static bool sort_fn(QPointF one, QPointF two);
static void ensure_in_bounds(const QList<QPointF>& points, int i, f& x, f& y);
static int element_count(const QList<QPointF>& points, double max_input);
@@ -125,13 +125,13 @@ class OTR_SPLINE_EXPORT spline : public base_spline
std::shared_ptr<QObject> ctx { std::make_shared<QObject>() };
mutable QPointF last_input_value{-1, -1};
- mutable std::vector<float> data = std::vector<float>(value_count, magic_fill_value);
+ mutable std::vector<f> data = std::vector<f>(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: