mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 09:17:23 +01:00
[apps/graph] Replace multiple pointers to evaluate context by
app()->evaluateContext() Change-Id: I21035aa357e9d2f2c471ad5751bed59cf05cebf3
This commit is contained in:
@@ -47,11 +47,10 @@ ValuesController::ContentView::TableState ValuesController::ContentView::tableSt
|
||||
|
||||
/* Value Controller */
|
||||
|
||||
ValuesController::ValuesController(Responder * parentResponder, FunctionStore * functionStore, EvaluateContext * evaluateContext) :
|
||||
ValuesController::ValuesController(Responder * parentResponder, FunctionStore * functionStore) :
|
||||
HeaderViewController(parentResponder, &m_contentView),
|
||||
m_selectableTableView(SelectableTableView(this, this, k_topMargin, k_rightMargin, k_bottomMargin, k_leftMargin)),
|
||||
m_functionStore(functionStore),
|
||||
m_evaluateContext(evaluateContext),
|
||||
m_parameterController(ValuesParameterController(this, &m_interval)),
|
||||
m_abscissaParameterController(AbscissaParameterController(this, &m_parameterController)),
|
||||
m_functionParameterController(FunctionParameterController(this)),
|
||||
@@ -384,10 +383,11 @@ void ValuesController::willDisplayCellAtLocation(TableViewCell * cell, int i, in
|
||||
}
|
||||
Function * function = functionAtColumn(i);
|
||||
float x = m_interval.element(j-1);
|
||||
App * graphApp = (Graph::App *)app();
|
||||
if (isDerivativeColumn(i)) {
|
||||
Float(function->approximateDerivative(x, m_evaluateContext)).convertFloatToText(buffer, Constant::FloatBufferSizeInScientificMode, Constant::NumberOfDigitsInMantissaForDerivativeNumberInScientificMode);
|
||||
Float(function->approximateDerivative(x, (EvaluateContext *)graphApp->evaluateContext())).convertFloatToText(buffer, Constant::FloatBufferSizeInScientificMode, Constant::NumberOfDigitsInMantissaForDerivativeNumberInScientificMode);
|
||||
} else {
|
||||
Float(function->evaluateAtAbscissa(x, m_evaluateContext)).convertFloatToText(buffer, Constant::FloatBufferSizeInScientificMode, Constant::NumberOfDigitsInMantissaInScientificMode);
|
||||
Float(function->evaluateAtAbscissa(x, (EvaluateContext *)graphApp->evaluateContext())).convertFloatToText(buffer, Constant::FloatBufferSizeInScientificMode, Constant::NumberOfDigitsInMantissaInScientificMode);
|
||||
}
|
||||
myValueCell->setText(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user