#define FIXED_POINT_I(x, y) { ((x) * 256) + ((y) * 256 / 1000) }
#define FIXED_INT_I(x) FIXED_POINT_I(x, 0)
-static inline fixed_point FIXED_POINT(unsigned x, unsigned y) {
- fixed_point r = { ((int) x * 256) + ((int) y * 256 / 1000) };
+static inline fixed_point FIXED_POINT(int32_t x, int32_t y) {
+ fixed_point r = { (x * 256) + (y * 256 / 1000) };
return r;
}
-static inline fixed_point FIXED_INT(unsigned x) { return FIXED_POINT(x, 0); }
+static inline fixed_point FIXED_INT(int32_t x) { return FIXED_POINT(x, 0); }
static inline int fixed_point_cast_int(fixed_point x) { return x.data / 256; }