summaryrefslogtreecommitdiff
path: root/include/fitz/math.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/fitz/math.h')
-rw-r--r--include/fitz/math.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/include/fitz/math.h b/include/fitz/math.h
index b2f1bf24..4dee81fc 100644
--- a/include/fitz/math.h
+++ b/include/fitz/math.h
@@ -1,19 +1,7 @@
/* multiply 8-bit fixpoint (0..1) so that 0*0==0 and 255*255==255 */
-static inline unsigned char fz_mul255(unsigned char a, unsigned char b)
-{
- return (a * ((unsigned int)b + 1)) >> 8;
-}
-
-/* floor / ceil towards/from +/- inf */
-static inline float fz_floor(float x)
-{
- return floor(x);
-}
-
-static inline float fz_ceil(float x)
-{
- return ceil(x);
-}
+#define fz_mul255(a,b) (((a) * ((b) + 1)) >> 8)
+#define fz_floor(x) floor(x)
+#define fz_ceil(x) ceil(x)
/* divide and floor towards -inf */
static inline int fz_idiv(int a, int b)