From 3b425b8bf0c58e25da576ed86496171ea19240f9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 16 Nov 2004 08:58:17 +0100 Subject: removed c99-isms. improved bbox handling. --- include/fitz/math.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'include/fitz/math.h') 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) -- cgit v1.2.3