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

◆ ExtractFractionAndBiasedExponent() [3/3]

static ushort System.Number.ExtractFractionAndBiasedExponent ( Half value,
out int exponent )
inlinestaticprivate

Definition at line 3527 of file Number.cs.

3528 {
3529 ushort num = BitConverter.HalfToUInt16Bits(value);
3530 ushort num2 = (ushort)(num & 0x3FFu);
3531 exponent = (num >> 10) & 0x1F;
3532 if (exponent != 0)
3533 {
3534 num2 = (ushort)(num2 | 0x400u);
3535 exponent -= 25;
3536 }
3537 else
3538 {
3539 exponent = -24;
3540 }
3541 return num2;
3542 }

References System.BitConverter.HalfToUInt16Bits(), and System.value.