X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=util.h;h=5c15c9f789fceda67e764002413d053911524806;hp=77841023363b862a834c86ee9367b28038650b4e;hb=1320ed72d619610b9f056c106496dfe7dbd95e06;hpb=7f1c8bb8b3ce08b94054f0a8990e5b8225d36036 diff --git a/util.h b/util.h index 7784102..5c15c9f 100644 --- a/util.h +++ b/util.h @@ -34,6 +34,9 @@ void print_3x3_matrix(const Eigen::Matrix3d &m); // Output a GLSL 3x3 matrix declaration. std::string output_glsl_mat3(const std::string &name, const Eigen::Matrix3d &m); +// Calculate a / b, rounding up. Does not handle overflow correctly. +unsigned div_round_up(unsigned a, unsigned b); + // Calculate where to sample, and with what weight, if one wants to use // the GPU's bilinear hardware to sample w1 * x[0] + w2 * x[1]. //