--- ray/src/common/face.c 2003/03/21 18:48:46 2.10 +++ ray/src/common/face.c 2006/03/02 16:51:54 2.12 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: face.c,v 2.10 2003/03/21 18:48:46 greg Exp $"; +static const char RCSid[] = "$Id: face.c,v 2.12 2006/03/02 16:51:54 greg Exp $"; #endif /* * face.c - routines dealing with polygonal faces. @@ -125,10 +125,10 @@ FACE *f; double x, y; int tst; register int xi, yi; - register FLOAT *p0, *p1; + register RREAL *p0, *p1; - xi = (f->ax+1)%3; - yi = (f->ax+2)%3; + if ((xi = f->ax + 1) >= 3) xi -= 3; + if ((yi = xi + 1) >= 3) yi -= 3; x = p[xi]; y = p[yi]; n = f->nv;