mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-20 23:41:45 +02:00
Limit polynomial degree to 100
100 is still high, but it should avoid abnormal figures causing out-of-memory errors. Fixes #251.
This commit is contained in:
@@ -319,7 +319,9 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener {
|
||||
|
||||
floatingActionBar.removeAllViews();
|
||||
|
||||
PolynomialFitter polyFitter = new PolynomialFitter(Integer.parseInt(prefs.getString("regressionLineOrder", "1")));
|
||||
PolynomialFitter polyFitter = new PolynomialFitter(
|
||||
Math.min(Integer.parseInt(prefs.getString("regressionLineOrder", "1")),
|
||||
100));
|
||||
|
||||
for (MeasurementView view : measurementViews) {
|
||||
if (view instanceof FloatMeasurementView) {
|
||||
|
Reference in New Issue
Block a user