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

◆ IsPow2() [1/2]

static bool IBinaryNumber< double >. System.Double.IsPow2 ( double value)
inlinestatic

Definition at line 478 of file Double.cs.

479 {
480 ulong num = BitConverter.DoubleToUInt64Bits(value);
481 uint num2 = (uint)(int)(num >> 52) & 0x7FFu;
482 ulong num3 = num & 0xFFFFFFFFFFFFFuL;
483 if (value > 0.0 && num2 != 0 && num2 != 2047)
484 {
485 return num3 == 0;
486 }
487 return false;
488 }

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