summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-02-09 16:46:56 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-02-09 16:46:56 +0000
commit456480981a8c97242f7a304fbe45d7b908fc9d43 (patch)
tree005a53a42cf10cff70ff35824118de6d8903cf34
parenta241b22aaa0ca365fe50b9ada6386b82d4673d6a (diff)
fixed line clipping bug; change DIFFERENT_SIGNS macro ala Mesa 3.5
-rw-r--r--src/mesa/main/clip.c16
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];