BitField64
A 64-bit array of bits.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Struct
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
public struct BitField64
Remarks
Stack allocated, so it does not require thread safety checks or disposal.
Fields
Value | Description |
|---|---|
| Value | The 64 bits, stored as a ulong. |
Constructors
Constructor | Description |
|---|---|
| BitField64(System.UInt64) | Initializes and returns an instance of BitField64. |
Methods
Method | 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 | Returns one or more contiguous bits from the bit field as the lower bits of a ulong. |
| IsSet | Returns true if the bit at a position is 1. |
| SetBits | Sets a single bit to 1 or 0. |
| TestAll | Returns true if all of the bits in a contiguous range are 1. |
| TestAny | Returns true if any of the bits in a contiguous range are 1. |
| TestNone | Returns true if none of the bits in a contiguous range are 1. |