[poincare] Clean: convertFloatToText should be in PrintFloat instead of

Complex
This commit is contained in:
Émilie Feral
2018-02-14 17:45:06 +01:00
committed by EmilieNumworks
parent d9150d4faa
commit 6de71ae145
118 changed files with 392 additions and 388 deletions

View File

@@ -15,7 +15,7 @@ void FunctionBannerDelegate::reloadBannerViewForCursorOnFunction(CurveViewCursor
strlcpy(buffer, legend, legendLength+1);
numberOfChar += legendLength;
buffer[0] = symbol;
numberOfChar += Complex<float>::convertFloatToText(cursor->x(), buffer+numberOfChar, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits);
numberOfChar += PrintFloat::convertFloatToText<double>(cursor->x(), buffer+numberOfChar, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits);
strlcpy(buffer+numberOfChar, space, spaceLength+1);
buffer[k_maxDigitLegendLength+2] = 0;
bannerView()->setLegendAtIndex(buffer, 0);
@@ -27,7 +27,7 @@ void FunctionBannerDelegate::reloadBannerViewForCursorOnFunction(CurveViewCursor
strlcpy(buffer, legend, legendLength+1);
buffer[2] = symbol;
buffer[0] = function->name()[0];
numberOfChar += Complex<float>::convertFloatToText(cursor->y(), buffer+legendLength, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits);
numberOfChar += PrintFloat::convertFloatToText<double>(cursor->y(), buffer+legendLength, PrintFloat::bufferSizeForFloatsWithPrecision(Constant::MediumNumberOfSignificantDigits), Constant::MediumNumberOfSignificantDigits);
strlcpy(buffer+numberOfChar, space, spaceLength+1);
buffer[k_maxDigitLegendLength+5] = 0;
bannerView()->setLegendAtIndex(buffer, 1);