Skip to main content

round_up_pow2n

Function round_up_pow2n 

Source
pub fn round_up_pow2n<T>(x: T, a: T) -> T
where T: BitAnd<T, Output = T> + Copy + Not<Output = T> + One + Sub<T, Output = T> + Add<T, Output = T>,
Expand description

computes round up of x to the nearest multiple of a, specialized for a is a power of 2