Struct BitField64
A 64-bit array of bits.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
public struct BitField64
Remarks
Stack allocated, so it does not require thread safety checks or disposal.
Constructors
Name | Description |
---|---|
BitField64(ulong) | Initializes and returns an instance of BitField64. |
Fields
Name | Description |
---|---|
Value | The 64 bits, stored as a ulong. |
Methods
Name | Description |
---|---|
Clear() | Clears all bits to 0. |
CountBits() | Returns the number of bits that are 1. |
CountLeadingZeros() | Returns the number of leading zeroes. |
CountTrailingZeros() | Returns the number of trailing zeros. |
GetBits(int, int) | Returns one or more contiguous bits from the bit field as the lower bits of a ulong. |
IsSet(int) | Returns true if the bit at a position is 1. |
SetBits(int, bool) | Sets a single bit to 1 or 0. |
SetBits(int, bool, int) | Sets one or more contiguous bits to 1 or 0. |