From 33143303feaf84afbef2e63ac0adab2d70b3c344 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 10 Apr 2001 15:25:45 +0000 Subject: Added IROUND_POS() macro to mmath.h and use where appropriate. (Klaus Niederkrueger) --- src/mesa/swrast/s_accum.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/mesa/swrast/s_accum.c') diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c index d93396677f..f338886c9c 100644 --- a/src/mesa/swrast/s_accum.c +++ b/src/mesa/swrast/s_accum.c @@ -1,4 +1,4 @@ -/* $Id: s_accum.c,v 1.9 2001/03/19 02:25:36 keithw Exp $ */ +/* $Id: s_accum.c,v 1.10 2001/04/10 15:25:45 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -27,6 +27,7 @@ #include "context.h" #include "macros.h" +#include "mmath.h" #include "mem.h" #include "s_accum.h" @@ -449,7 +450,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, GLint j; if (mult != prevMult) { for (j = 0; j < max; j++) - multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F); + multTable[j] = IROUND((GLfloat) j * mult); prevMult = mult; } @@ -490,11 +491,11 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value, for (j=0;jDrawBuffer->Accum + ypos * width4 + xpos*4; for (i=0;i