fix ceil_div_short
the existing implementation causes issues for some reason, at least on my F256K anyway?
This commit is contained in:
parent
8e50c61349
commit
a447776078
|
@ -15,7 +15,11 @@
|
|||
* @return the smallest short c such that c >= a / b
|
||||
*/
|
||||
short ceil_div_short(short a, short b) {
|
||||
return (a + (b - 1)) / b;
|
||||
if (a % b) {
|
||||
return (a / b) + 1;
|
||||
} else {
|
||||
return a / b;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue