diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:29:15 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-25 19:29:15 +0000 |
commit | 54d675d206d1dbb9901e33ccc14988daf98f97b8 (patch) | |
tree | 37e61cb486600aa90bff3730a77198b9ff133707 /RenderLogo.c | |
parent | 05b7c570b155f167e5a7f1b804e10b870bbc762c (diff) |
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_901xf86-4_3_99_16
Diffstat (limited to 'RenderLogo.c')
-rw-r--r-- | RenderLogo.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/RenderLogo.c b/RenderLogo.c index ce8c462..d99a702 100644 --- a/RenderLogo.c +++ b/RenderLogo.c @@ -25,10 +25,9 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/xlogo/RenderLogo.c,v 1.2 2002/10/19 19:15:32 herrb Exp $ */ +/* $XFree86: xc/programs/xlogo/RenderLogo.c,v 1.4 2003/05/29 15:20:57 tsi Exp $ */ #include <stdio.h> -#include <math.h> #include <X11/Xlib.h> #include <X11/extensions/Xrender.h> @@ -152,12 +151,12 @@ intersect(XLineDouble *l1, XLineDouble *l2, XPointDouble *intersection) intersection->x = m1 * intersection->y + b1; check = m2 * intersection->y + b2; - if (fabs(check - intersection->x) > (1/(double)(1<<16))) { -#ifdef __GNUC__ - fprintf(stderr, "%s: intersection is off by: %f\n", __FUNCTION__, fabs(check - intersection->x)); -#else - fprintf(stderr, "intersect: intersection is off by %f\n", fabs(check - instersection->x)); -#endif + if (check >= intersection->x) + check -= intersection->x; + else + check = intersection->x - check; + if (check > (1/(double)(1<<16))) { + fprintf(stderr, "intersect: intersection is off by %f\n", check); } } |