Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FormatScientific()

static unsafe void System.Globalization.FormatProvider.Number.FormatScientific ( ref System::Text::ValueStringBuilder sb,
ref NumberBuffer number,
int nMinDigits,
int nMaxDigits,
NumberFormatInfo info,
char expChar )
inlinestaticprivate

Definition at line 682 of file FormatProvider.cs.

683 {
684 char* digits = number.digits;
685 sb.Append((*digits != 0) ? (*(digits++)) : '0');
686 if (nMaxDigits != 1)
687 {
688 sb.Append(info.NumberDecimalSeparator);
689 }
690 while (--nMaxDigits > 0)
691 {
692 sb.Append((*digits != 0) ? (*(digits++)) : '0');
693 }
694 int value = ((*number.digits != 0) ? (number.scale - 1) : 0);
695 FormatExponent(ref sb, info, value, expChar, 3, positiveSign: true);
696 }
static unsafe void FormatExponent(ref System.Text.ValueStringBuilder sb, NumberFormatInfo info, int value, char expChar, int minDigits, bool positiveSign)

References System.Globalization.FormatProvider.Number.FormatExponent(), System.info, and System.value.

Referenced by System.Globalization.FormatProvider.Number.NumberToString().