mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare] PrintFloat: take into account the distinction between char
and glyph length in ConvertFloatToText
This commit is contained in:
committed by
LeaNumworks
parent
d6ad694b76
commit
4d593a6149
@@ -121,9 +121,9 @@ void FloatParameterController<T>::willDisplayCellForIndex(HighlightCell * cell,
|
||||
return;
|
||||
}
|
||||
constexpr int precision = Preferences::LargeNumberOfSignificantDigits;
|
||||
constexpr int bufferSize = PrintFloat::bufferSizeForFloatsWithPrecision(precision);
|
||||
constexpr int bufferSize = PrintFloat::charSizeForFloatsWithPrecision(precision);
|
||||
char buffer[bufferSize];
|
||||
PrintFloat::ConvertFloatToText<T>(parameterAtIndex(index), buffer, bufferSize, precision, Preferences::PrintFloatMode::Decimal);
|
||||
PoincareHelpers::ConvertFloatToTextWithDisplayMode<T>(parameterAtIndex(index), buffer, bufferSize, precision, Preferences::PrintFloatMode::Decimal);
|
||||
myCell->setAccessoryText(buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user