mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/regression] Prediction knowing y: if the value has multiple
antecedent (horizontal slope) reselect last cursor position Change-Id: I730819c1c0ef5cbe0b3234368185dc7e56a74955
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "go_to_parameter_controller.h"
|
||||
#include "../apps_container.h"
|
||||
#include <assert.h>
|
||||
#include <float.h>
|
||||
|
||||
using namespace Shared;
|
||||
using namespace Poincare;
|
||||
@@ -48,6 +49,10 @@ bool GoToParameterController::setParameterAtIndex(int parameterIndex, float f) {
|
||||
return false;
|
||||
}
|
||||
if (isnan(x)) {
|
||||
if (m_store->slope() < FLT_EPSILON && f == 0.0f) {
|
||||
m_cursor->moveTo(m_cursor->x(), f);
|
||||
return true;
|
||||
}
|
||||
app()->displayWarning(I18n::Message::ValueNotReachedByRegression);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user