diff options
author | Tor Andersson <tor@ghostscript.com> | 2004-11-16 08:58:17 +0100 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2004-11-16 08:58:17 +0100 |
commit | 3b425b8bf0c58e25da576ed86496171ea19240f9 (patch) | |
tree | 37d6feb715dd929392fb16fdde6cf994dfbc1397 /include/fitz/math.h | |
parent | 49132f70ac40b2dc7b9a0e22b33a3964af687874 (diff) | |
download | mupdf-3b425b8bf0c58e25da576ed86496171ea19240f9.tar.xz |
removed c99-isms. improved bbox handling.
Diffstat (limited to 'include/fitz/math.h')
-rw-r--r-- | include/fitz/math.h | 18 |
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) |