Bucket refresher. Broken
This commit is contained in:
parent
658bbdb652
commit
c8967f2469
3 changed files with 125 additions and 48 deletions
|
|
@ -102,6 +102,12 @@ impl Id20 {
|
|||
}
|
||||
Id20(xor)
|
||||
}
|
||||
pub fn get_bit(&self, bit: u8) -> bool {
|
||||
let n = self.0[(bit / 8) as usize];
|
||||
let mask = !(1 << (7 - bit % 8));
|
||||
n & mask > 0
|
||||
}
|
||||
|
||||
pub fn set_bit(&mut self, bit: u8, value: bool) {
|
||||
let n = &mut self.0[(bit / 8) as usize];
|
||||
if value {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue