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

◆ TryParse() [7/16]

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

Definition at line 1005 of file Utf8Parser.cs.

1006 {
1007 byte* digits = stackalloc byte[114];
1008 Number.NumberBuffer number = new Number.NumberBuffer(Number.NumberBufferKind.FloatingPoint, digits, 114);
1009 if (TryParseNormalAsFloatingPoint(source, ref number, out bytesConsumed, standardFormat))
1010 {
1011 value = Number.NumberToSingle(ref number);
1012 return true;
1013 }
1014 return TryParseAsSpecialFloatingPoint(source, float.PositiveInfinity, float.NegativeInfinity, float.NaN, out value, out bytesConsumed);
1015 }
static bool TryParseNormalAsFloatingPoint(ReadOnlySpan< byte > source, ref Number.NumberBuffer number, out int bytesConsumed, char standardFormat)

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