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

◆ FormatExponent()

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

Definition at line 3298 of file Number.cs.

3299 {
3300 sb.Append(expChar);
3301 if (value < 0)
3302 {
3303 sb.Append(info.NegativeSign);
3304 value = -value;
3305 }
3306 else if (positiveSign)
3307 {
3308 sb.Append(info.PositiveSign);
3309 }
3310 char* ptr = stackalloc char[10];
3311 char* ptr2 = UInt32ToDecChars(ptr + 10, (uint)value, minDigits);
3312 sb.Append(ptr2, (int)(ptr + 10 - ptr2));
3313 }
static unsafe byte * UInt32ToDecChars(byte *bufferEnd, uint value, int digits)
Definition Number.cs:2360

References System.info, System.Number.UInt32ToDecChars(), and System.value.

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