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

◆ ExtractFractionAndBiasedExponent() [1/3]

static ulong System.Number.ExtractFractionAndBiasedExponent ( double value,
out int exponent )
inlinestaticprivate

Definition at line 3510 of file Number.cs.

3511 {
3512 ulong num = BitConverter.DoubleToUInt64Bits(value);
3513 ulong num2 = num & 0xFFFFFFFFFFFFFuL;
3514 exponent = (int)(num >> 52) & 0x7FF;
3515 if (exponent != 0)
3516 {
3517 num2 |= 0x10000000000000uL;
3518 exponent -= 1075;
3519 }
3520 else
3521 {
3522 exponent = -1074;
3523 }
3524 return num2;
3525 }

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

Referenced by System.Number.DiyFp.DiyFp(), System.Number.DiyFp.DiyFp(), System.Number.DiyFp.DiyFp(), System.Number.Dragon4Double(), System.Number.Dragon4Half(), and System.Number.Dragon4Single().