Add missing math.rs
This commit is contained in:
parent
040e3bfc2d
commit
e9899ac610
7
src/math.rs
Normal file
7
src/math.rs
Normal file
@ -0,0 +1,7 @@
|
||||
pub fn div_up(v: usize, divisor: usize) -> usize {
|
||||
v / divisor + (v % divisor != 0) as usize
|
||||
}
|
||||
|
||||
pub fn div_down(v: usize, divisor: usize) -> usize {
|
||||
v / divisor
|
||||
}
|
Loading…
Reference in New Issue
Block a user