SetBits
Sets a range of bits to 0 or 1.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
SetBits(int, bool, int)
Sets a range of bits to 0 or 1.
public void SetBits(int pos, bool value, int numBits)
Parameters
Remarks
The range runs from index up to (but not including) . No exception is thrown if exceeds the length.
pospos + numBitspos + numBitsSetBits(int, ulong, int)
Copies bits of a ulong to bits in this array.
public void SetBits(int pos, ulong value, int numBits = 1)
Parameters
Remarks
The destination bits in this array run from index pos up to (but not including) . No exception is thrown if exceeds the length.
pos + numBitspos + numBitsThe lowest bit of the ulong is copied to the first destination bit; the second-lowest bit of the ulong is copied to the second destination bit; and so forth.