MCPcopy Create free account
hub / github.com/Tracktion/choc / writeAsExponentNotation

Method writeAsExponentNotation

choc/text/choc_FloatToString.h:211–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 }
210
211 static char* writeAsExponentNotation (char* dest, uint32_t totalLength, int exponent)
212 {
213 if (totalLength == 1)
214 return writeExponent (dest + 1, exponent);
215
216 insertChar (dest + 1, totalLength - 1, '.', 1);
217
218 while (dest[totalLength] == '0' && totalLength > 2)
219 --totalLength;
220
221 return writeExponent (dest + (totalLength + 1), exponent);
222 }
223
224 static char* writeWithoutExponentLessThan1 (char* dest, uint32_t length, int mantissaDigits, int maxDecimalPlaces)
225 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected