fix ceil_div_short

the existing implementation causes issues for some reason, at least on
my F256K anyway?
This commit is contained in:
Gered 2025-02-02 15:42:26 -05:00
parent 8e50c61349
commit a447776078

View file

@ -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;
}
}
/**