INNER CODE UNIT · Rust
percent_len
Daniel-Liu-c0deb0t/block-aligner · src/lib.rs:109
pub fn percent_len(len: usize, p: f32) -> usize {
((p * (len as f32)).round() as usize).max(32).next_power_of_two().min(1 << 14)
}
INNER CODE UNIT · Rust
Daniel-Liu-c0deb0t/block-aligner · src/lib.rs:109
pub fn percent_len(len: usize, p: f32) -> usize {
((p * (len as f32)).round() as usize).max(32).next_power_of_two().min(1 << 14)
}