mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-15 13:43:08 +00:00
10 lines
189 B
Rust
10 lines
189 B
Rust
|
pub fn div_up_usize(p: usize, q: usize) -> usize {
|
||
|
if p % q == 0 { p/q }
|
||
|
else { 1 + p/q }
|
||
|
}
|
||
|
|
||
|
pub fn div_up(p: u32, q: u32) -> u32 {
|
||
|
if p % q == 0 { p/q }
|
||
|
else { 1 + p/q }
|
||
|
}
|