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

◆ TryParse() [6/16]

static unsafe bool System.Buffers.Text.Utf8Parser.TryParse ( ReadOnlySpan< byte > source,
out double value,
out int bytesConsumed,
char standardFormat = '\0' )
inlinestatic

Definition at line 1017 of file Utf8Parser.cs.

1018 {
1019 byte* digits = stackalloc byte[769];
1020 Number.NumberBuffer number = new Number.NumberBuffer(Number.NumberBufferKind.FloatingPoint, digits, 769);
1021 if (TryParseNormalAsFloatingPoint(source, ref number, out bytesConsumed, standardFormat))
1022 {
1023 value = Number.NumberToDouble(ref number);
1024 return true;
1025 }
1026 return TryParseAsSpecialFloatingPoint(source, double.PositiveInfinity, double.NegativeInfinity, double.NaN, out value, out bytesConsumed);
1027 }
static bool TryParseNormalAsFloatingPoint(ReadOnlySpan< byte > source, ref Number.NumberBuffer number, out int bytesConsumed, char standardFormat)

References System.Number.NumberToDouble(), System.source, System.Buffers.Text.Utf8Parser.TryParseNormalAsFloatingPoint(), and System.value.