diff --git a/apps/regression/store.cpp b/apps/regression/store.cpp index bbd283767..6565e8bd9 100644 --- a/apps/regression/store.cpp +++ b/apps/regression/store.cpp @@ -61,7 +61,7 @@ void Store::setSeriesRegressionType(int series, Model::Type type) { } } -int Store::closestVerticalRegression(int direction, float x, float y, int currentRegressionSeries, Poincare::Context * globalContext) { +int Store::closestVerticalRegression(int direction, double x, double y, int currentRegressionSeries, Poincare::Context * globalContext) { int regressionSeries = -1; float closestDistance = INFINITY; /* The conditions to test on all the regressions are in this order: @@ -85,9 +85,9 @@ int Store::closestVerticalRegression(int direction, float x, float y, int curren /* Dots */ -int Store::closestVerticalDot(int direction, float x, float y, int currentSeries, int currentDot, int * nextSeries, Poincare::Context * globalContext) { - float nextX = INFINITY; - float nextY = INFINITY; +int Store::closestVerticalDot(int direction, double x, double y, int currentSeries, int currentDot, int * nextSeries, Poincare::Context * globalContext) { + double nextX = INFINITY; + double nextY = INFINITY; int selectedDot = -1; /* The conditions to test on all dots are in this order: * - if the currentDot is valid, the next series should not be the current series diff --git a/apps/regression/store.h b/apps/regression/store.h index 1d360dbef..a3c7bc447 100644 --- a/apps/regression/store.h +++ b/apps/regression/store.h @@ -30,11 +30,11 @@ public: } /* Return the series index of the closest regression at abscissa x, above * ordinate y if direction > 0, below otherwise */ - int closestVerticalRegression(int direction, float x, float y, int currentRegressionSeries, Poincare::Context * globalContext); + int closestVerticalRegression(int direction, double x, double y, int currentRegressionSeries, Poincare::Context * globalContext); // Dots /* Return the closest dot to abscissa x above the regression curve if * direction > 0, below otherwise */ - int closestVerticalDot(int direction, float x, float y, int currentSeries, int currentDot, int * nextSeries, Poincare::Context * globalContext); + int closestVerticalDot(int direction, double x, double y, int currentSeries, int currentDot, int * nextSeries, Poincare::Context * globalContext); /* Return the closest dot to given dot, on the right if direction > 0, * on the left otherwise */ int nextDot(int series, int direction, int dot);