Commit 45648098 authored by Brian Paul's avatar Brian Paul
Browse files

fixed line clipping bug; change DIFFERENT_SIGNS macro ala Mesa 3.5

parent a241b22a
/* $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];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment