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

◆ FormatExponent()

static unsafe void System.Globalization.FormatProvider.Number.FormatExponent ( ref System::Text::ValueStringBuilder sb,
NumberFormatInfo info,
int value,
char expChar,
int minDigits,
bool positiveSign )
inlinestaticprivate

Definition at line 698 of file FormatProvider.cs.

699 {
700 sb.Append(expChar);
701 if (value < 0)
702 {
703 sb.Append(info.NegativeSign);
704 value = -value;
705 }
706 else if (positiveSign)
707 {
708 sb.Append(info.PositiveSign);
709 }
710 char* ptr = stackalloc char[11];
711 int index = 10;
712 Int32ToDecChars(ptr, ref index, (uint)value, minDigits);
713 int num = 10 - index;
714 while (--num >= 0)
715 {
716 sb.Append(ptr[index++]);
717 }
718 }
static unsafe void Int32ToDecChars(char *buffer, ref int index, uint value, int digits)

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

Referenced by System.Globalization.FormatProvider.Number.FormatGeneral(), System.Globalization.FormatProvider.Number.FormatScientific(), and System.Globalization.FormatProvider.Number.NumberToStringFormat().