fix MIN/MAX mix-up

This commit is contained in:
Brian
2007-07-12 10:43:33 -06:00
parent 2371ed36f7
commit 5b06424a15
+7 -3
View File
@@ -25,9 +25,13 @@
*
**************************************************************************/
/* Authors: Keith Whitwell <keith@tungstengraphics.com>
/**
* \brief Clipping stage
*
* \author Keith Whitwell <keith@tungstengraphics.com>
*/
#include "main/macros.h"
#include "draw_private.h"
@@ -322,12 +326,12 @@ do_clip_line( struct prim_stage *stage,
if (dp1 < 0) {
GLfloat t = dp1 / (dp1 - dp0);
t1 = MIN2(t1, t);
t1 = MAX2(t1, t);
}
if (dp0 < 0) {
GLfloat t = dp0 / (dp0 - dp1);
t0 = MIN2(t0, t);
t0 = MAX2(t0, t);
}
if (t0 + t1 >= 1.0)