[apps] Move sumBetweenBounds from Shared::Function to Shared::SumGraphController

This commit is contained in:
Ruben Dashyan
2019-07-03 16:05:36 +02:00
committed by Léa Saviot
parent 1d0668a84c
commit 43d72e082f
11 changed files with 19 additions and 22 deletions

View File

@@ -6,7 +6,6 @@
#include <poincare/code_point_layout.h>
#include <poincare/vertical_offset_layout.h>
#include <poincare/integer.h>
#include <poincare/sum.h>
#include "../shared/poincare_helpers.h"
#include <string.h>
#include <cmath>
@@ -186,11 +185,6 @@ T Sequence::approximateToNextRank(int n, SequenceContext * sqctx) const {
}
}
double Sequence::sumBetweenBounds(double start, double end, Context * context) const {
Poincare::Sum sum = Poincare::Sum::Builder(expressionReduced(context).clone(), Symbol::Builder(UCodePointUnknownX), Poincare::Float<double>::Builder(start), Poincare::Float<double>::Builder(end)); // Sum takes ownership of args
return PoincareHelpers::ApproximateToScalar<double>(sum, *context);
}
Sequence::SequenceRecordDataBuffer * Sequence::recordData() const {
assert(!isNull());
Ion::Storage::Record::Data d = value();