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

◆ IsPow2() [1/2]

static bool IBinaryNumber< float >. System.Single.IsPow2 ( float value)
inlinestatic

Definition at line 478 of file Single.cs.

479 {
480 uint num = BitConverter.SingleToUInt32Bits(value);
481 uint num2 = (num >> 23) & 0xFFu;
482 uint num3 = num & 0x7FFFFFu;
483 if (value > 0f && num2 != 0 && num2 != 255)
484 {
485 return num3 == 0;
486 }
487 return false;
488 }

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