mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-28 10:09:53 +01:00
[apps/shared] Move sumBetweenBounds from controller (SumGraphController)
to the models (Sequence or CartesianFunction) and CartesianFunction::sumBetweenBounds takes into account the function domain
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "term_sum_controller.h"
|
||||
#include "../../shared/text_field_delegate.h"
|
||||
#include <poincare/sum.h>
|
||||
#include <poincare/code_point_layout.h>
|
||||
#include <poincare/horizontal_layout.h>
|
||||
#include <poincare/vertical_offset_layout.h>
|
||||
@@ -54,8 +53,4 @@ Layout TermSumController::createFunctionLayout(Shared::ExpiringPointer<Shared::F
|
||||
return sequence->nameLayout();
|
||||
}
|
||||
|
||||
Poincare::Expression TermSumController::sumBetweenBounds(Shared::ExpiringPointer<Shared::Function> function, double start, double end, Poincare::Context * context) const {
|
||||
return Poincare::Sum::Builder(function->expressionReduced(context).clone(), Poincare::Symbol::Builder(UCodePointUnknownX), Poincare::Float<double>::Builder(start), Poincare::Float<double>::Builder(end)); // Sum takes ownership of args
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user