dri: Rework planar image interface
[mesa.git] / src / glu / sgi / libnurbs / nurbtess / partitionY.cc
index d7e6bcb5d49627ac42f1f0c95a32cfbf38062fbb..e097461ac5e92919014b46dd8c7851a5eee62389 100644 (file)
 ** published by SGI, but has not been independently verified as being
 ** compliant with the OpenGL(R) version 1.2.1 Specification.
 **
-** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
 */
 /*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
 */
 
 #include <stdlib.h>
@@ -113,8 +111,8 @@ Int isCusp(directedLine *v)
   else if(A[1] > B[1] && C[1] > B[1])
     return 1;
 
-  if(isAbove(v, v) && isAbove(v, v->getPrev()) ||
-     isBelow(v, v) && isBelow(v, v->getPrev()))
+  if((isAbove(v, v) && isAbove(v, v->getPrev())) ||
+     (isBelow(v, v) && isBelow(v, v->getPrev())))
     return 1;
   else
     return 0;
@@ -231,7 +229,7 @@ Int sweepRangeEqual(sweepRange* src1, sweepRange* src2)
  */
 inline/*static*/ Real intersectHoriz(Real x1, Real y1, Real x2, Real y2, Real y)
 {
-  return ((y2==y1)? (x1+x2)*0.5 : x1 + ((y-y1)/(y2-y1)) * (x2-x1));
+  return ((y2==y1)? (x1+x2)*Real(0.5) : x1 + ((y-y1)/(y2-y1)) * (x2-x1));
 /*
   if(y2 == y1) return (x1+x2)*0.5;
   else return x1 + ((y-y1)/(y2-y1)) * (x2-x1);
@@ -309,7 +307,7 @@ static Int compEdges(directedLine *e1, directedLine *e2)
   Real Ymax = min(e1_Ymax, e2_Ymax);
   Real Ymin = max(e1_Ymin, e2_Ymin);
     
-  Real y = 0.5*(Ymax + Ymin);
+  Real y = Real(0.5)*(Ymax + Ymin);
 
 /*  Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y);
   Real x2 = intersectHoriz(e2->head()[0], e2->head()[1], e2->tail()[0], e2->tail()[1], y);