get_bit

Function get_bit 

Source
pub fn get_bit(num: usize, bit_index: usize) -> bool
Expand description

Get the bit_index bit value from num.

ยงExample

use qip_iterators::utils::get_bit;
let n = get_bit(2, 1);
assert_eq!(n, true);