[apps] Add a function "sumBetweenBounds()" on Function (sum of terms on

Sequence, Integral on CartesianFunction)
This commit is contained in:
Émilie Feral
2018-01-10 14:35:32 +01:00
committed by EmilieNumworks
parent 7ea0dbeb56
commit cdfbc02499
9 changed files with 17 additions and 10 deletions

View File

@@ -192,7 +192,8 @@ bool SumGraphController::handleEnter() {
return true;
}
m_step = (Step)((int)m_step+1);
double sum = computeSum(m_startSum, m_endSum);
TextFieldDelegateApp * myApp = static_cast<TextFieldDelegateApp *>(app());
double sum = m_function->sumBetweenBounds(m_startSum, m_endSum, myApp->localContext());
m_legendView.setSumSymbol(m_step, m_startSum, m_endSum, sum, m_function->name());
m_legendView.setLegendMessage(I18n::Message::Default, m_step);
m_graphView->setAreaHighlightColor(true);