pub fn setValue(self: *Self, index: usize, value: bool) void
Changes the value of the specified bit of the bit set to match the passed boolean.
self: *Self
index: usize
value: bool
102 103 104 105 106 107 108
pub fn setValue(self: *Self, index: usize, value: bool) void { assert(index < bit_length); if (MaskInt == u0) return; const bit = maskBit(index); const new_bit = bit & std.math.boolMask(MaskInt, value); self.mask = (self.mask & ~bit) | new_bit; }
Changes the value of the specified bit of the bit set to match the passed boolean.