[poincare/Coordinate2D] Template for double or float

This commit is contained in:
Léa Saviot
2019-08-28 11:20:38 +02:00
parent 22dd9752a5
commit a15bc53e06
18 changed files with 104 additions and 103 deletions

View File

@@ -16,12 +16,12 @@ const char * RootGraphController::title() {
return I18n::translate(I18n::Message::Zeros);
}
Coordinate2D RootGraphController::computeNewPointOfInterest(double start, double step, double max, Context * context) {
Coordinate2D<double> RootGraphController::computeNewPointOfInterest(double start, double step, double max, Context * context) {
// TODO The following three lines should be factored.
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;
char unknownX[bufferSize];
Poincare::SerializationHelper::CodePoint(unknownX, bufferSize, UCodePointUnknownX);
return Coordinate2D(Shared::PoincareHelpers::NextRoot(functionStore()->modelForRecord(m_record)->expressionReduced(context), unknownX, start, step, max, context), 0.0);
return Coordinate2D<double>(Shared::PoincareHelpers::NextRoot(functionStore()->modelForRecord(m_record)->expressionReduced(context), unknownX, start, step, max, context), 0.0);
}
}