1use crate::std_types::c_int; 2 3pub fn Math_NextPowOf2(value: c_int) -> c_int { 4 let mut next = 1; 5 while value > next { 6 next <<= 1; 7 } 8 next 9} 10 11pub fn Math_IsPowOf2(value: c_int) -> bool { 12 value != 0 && (value & (value - 1)) == 0 13}