i965/vs: Add support for emitting DPH opcodes.
[mesa.git] / src / mesa / math / m_eval.c
index 9316625d97675f5dabcd956974c63049e1a9f645..d324673c5d772714a79be38240e7ac3d47884648 100644 (file)
@@ -1,10 +1,9 @@
-/* $Id: m_eval.c,v 1.4 2001/03/08 17:17:28 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
  * Version:  3.5
  *
- * Copyright (C) 1999-2000  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"),
@@ -38,8 +37,8 @@
  */
 
 
-#include "glheader.h"
-#include "config.h"
+#include "main/glheader.h"
+#include "main/config.h"
 #include "m_eval.h"
 
 static GLfloat inv_tab[MAX_EVAL_ORDER];
@@ -80,7 +79,7 @@ _math_horner_bezier_curve(const GLfloat * cp, GLfloat * out, GLfloat t,
 
    if (order >= 2) {
       bincoeff = (GLfloat) (order - 1);
-      s = 1.0 - t;
+      s = 1.0F - t;
 
       for (k = 0; k < dim; k++)
         out[k] = s * cp[k] + bincoeff * t * cp[dim + k];
@@ -134,7 +133,7 @@ _math_horner_bezier_surf(GLfloat * cn, GLfloat * out, GLfloat u, GLfloat v,
            /* Each control point is the point for parameter u on a */
            /* curve defined by the control polygons in u-direction */
            bincoeff = (GLfloat) (uorder - 1);
-           s = 1.0 - u;
+           s = 1.0F - u;
 
            for (k = 0; k < dim; k++)
               cp[j * dim + k] = s * ucp[k] + bincoeff * u * ucp[uinc + k];
@@ -198,7 +197,7 @@ _math_de_casteljau_surf(GLfloat * cn, GLfloat * out, GLfloat * du,
                        GLuint uorder, GLuint vorder)
 {
    GLfloat *dcn = cn + uorder * vorder * dim;
-   GLfloat us = 1.0 - u, vs = 1.0 - v;
+   GLfloat us = 1.0F - u, vs = 1.0F - v;
    GLuint h, i, j, k;
    GLuint minorder = uorder < vorder ? uorder : vorder;
    GLuint uinc = vorder * dim;
@@ -458,5 +457,5 @@ _math_init_eval(void)
    /* KW: precompute 1/x for useful x.
     */
    for (i = 1; i < MAX_EVAL_ORDER; i++)
-      inv_tab[i] = 1.0 / i;
+      inv_tab[i] = 1.0F / i;
 }