[][src]Function mini_haskell::utils::misc::round_to

pub const fn round_to(x: usize, n: usize) -> usize

Round x to multiples of n.

assert_eq!(round_to(20, 42), 42);
assert_eq!(round_to(1120, 1024), 2048);
assert_eq!(round_to(2048, 32), 2048);