[poincare] Expand numbers to complex numbers

Change-Id: I2e7cf5240e184da45b656ee4f121ad76aabfd1c7
This commit is contained in:
Émilie Feral
2017-02-02 17:37:01 +01:00
parent 131b364ae9
commit 676bd46f33
66 changed files with 602 additions and 392 deletions

View File

@@ -112,8 +112,8 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Table
const Expression * expression = expressionForIndex(index);
if (m_currentPage == Page::Scalar) {
myCell->displayExpression(false);
char buffer[Float::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
((Float *)expression)->convertFloatToText(buffer, Float::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits);
char buffer[Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
((Complex *)expression)->writeTextInBuffer(buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits));
myCell->setSubtitle(buffer);
return;
}