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

◆ ExtractFractionAndBiasedExponent() [2/3]

static uint System.Number.ExtractFractionAndBiasedExponent ( float value,
out int exponent )
inlinestaticprivate

Definition at line 3544 of file Number.cs.

3545 {
3546 uint num = BitConverter.SingleToUInt32Bits(value);
3547 uint num2 = num & 0x7FFFFFu;
3548 exponent = (int)((num >> 23) & 0xFF);
3549 if (exponent != 0)
3550 {
3551 num2 |= 0x800000u;
3552 exponent -= 150;
3553 }
3554 else
3555 {
3556 exponent = -149;
3557 }
3558 return num2;
3559 }

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