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

◆ CountBits() [3/3]

static int System.Reflection.Internal.BitArithmetic.CountBits ( ulong v)
inlinestaticpackage

Definition at line 17 of file BitArithmetic.cs.

18 {
19 v -= (v >> 1) & 0x5555555555555555L;
20 v = (v & 0x3333333333333333L) + ((v >> 2) & 0x3333333333333333L);
21 return (int)(((v + (v >> 4)) & 0xF0F0F0F0F0F0F0FL) * 72340172838076673L >> 56);
22 }

References System.L.