mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-21 07:51:46 +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();
|
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) {
|
for (MeasurementView view : measurementViews) {
|
||||||
if (view instanceof FloatMeasurementView) {
|
if (view instanceof FloatMeasurementView) {
|
||||||
|
Reference in New Issue
Block a user