diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-02-09 16:46:56 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-02-09 16:46:56 +0000 |
commit | 456480981a8c97242f7a304fbe45d7b908fc9d43 (patch) | |
tree | 005a53a42cf10cff70ff35824118de6d8903cf34 | |
parent | a241b22aaa0ca365fe50b9ada6386b82d4673d6a (diff) |
fixed line clipping bug; change DIFFERENT_SIGNS macro ala Mesa 3.5
-rw-r--r-- | src/mesa/main/clip.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mesa/main/clip.c b/src/mesa/main/clip.c index d3d1395d26..d28090c3d8 100644 --- a/src/mesa/main/clip.c +++ b/src/mesa/main/clip.c @@ -1,10 +1,10 @@ -/* $Id: clip.c,v 1.8 2000/04/17 18:18:00 keithw Exp $ */ +/* $Id: clip.c,v 1.8.4.1 2001/02/09 16:46:56 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.3 + * Version: 3.4.1 * - * Copyright (C) 1999 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -301,14 +301,8 @@ GLuint gl_userclip_point( GLcontext* ctx, const GLfloat v[] ) - -#if 0 -#define NEGATIVE(x) ((*(int *)&x)<0) -#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) -#else -#define NEGATIVE(x) (x < 0) -#define DIFFERENT_SIGNS(a,b) ((a*b) < 0) -#endif +#define NEGATIVE(x) ((x) < 0.0) +#define DIFFERENT_SIGNS(a, b) (((a) * (b)) <= 0.0 && ((a) != (b))) static clip_poly_func gl_poly_clip_tab[2][5]; |