Counts the bits in integer values. More...
Public Member Functions | |
| BitCount () | |
| Constructor which generates a bit count lookup array. | |
| int | FastBitcount (ushort testThis) |
| Find the number of bits in the parameter ushort. | |
| int | FastBitcount (short testThis) |
| Find the number of bits in the parameter short. | |
| int | FastBitcount (uint testThis) |
| Find the number of bits in the parameter uint. | |
| int | FastBitcount (int testThis) |
| Find the number of bits in the parameter int. | |
| int | FastBitcount (ulong testThis) |
| Find the number of bits in the parameter long. | |
| int | FastBitcount (long testThis) |
| Find the number of bits in the parameter int. | |
| int | FastBitcount (double testThis) |
| Find the number of bits in the parameter double. | |
Counts the bits in integer values.
Definition at line 13 of file BitCount.cs.
| NewGamePhysics.Utilities.BitCount.BitCount | ( | ) |
Constructor which generates a bit count lookup array.
Definition at line 25 of file BitCount.cs.
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | double | testThis | ) |
Find the number of bits in the parameter double.
| testThis | The number to count the bits of. |
Definition at line 104 of file BitCount.cs.
00105 { 00106 // Translate the double into a 64 bit long. 00107 long testThisBits = BitConverter.DoubleToInt64Bits(testThis); 00108 return FastBitcount((ulong)testThisBits); 00109 }
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | long | testThis | ) |
Find the number of bits in the parameter int.
| testThis | The number to count the bits of. |
Definition at line 94 of file BitCount.cs.
00095 { 00096 return FastBitcount((ulong)testThis); 00097 }
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | ulong | testThis | ) |
Find the number of bits in the parameter long.
| testThis | The number to count the bits of. |
Definition at line 81 of file BitCount.cs.
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | int | testThis | ) |
Find the number of bits in the parameter int.
| testThis | The number to count the bits of. |
Definition at line 71 of file BitCount.cs.
00072 { 00073 return FastBitcount((uint)testThis); 00074 }
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | uint | testThis | ) |
Find the number of bits in the parameter uint.
| testThis | The number to count the bits of. |
Definition at line 60 of file BitCount.cs.
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | short | testThis | ) |
Find the number of bits in the parameter short.
| testThis | The number to count the bits of. |
Definition at line 50 of file BitCount.cs.
00051 { 00052 return FastBitcount((ushort)testThis); 00053 }
| int NewGamePhysics.Utilities.BitCount.FastBitcount | ( | ushort | testThis | ) |
Find the number of bits in the parameter ushort.
| testThis | The number to count the bits of. |
Definition at line 40 of file BitCount.cs.
1.6.2