ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cv/tmesh.c
(Generate patch)

Comparing ray/src/cv/tmesh.c (file contents):
Revision 2.2 by greg, Wed Jul 24 13:07:47 1996 UTC vs.
Revision 2.3 by greg, Sat Feb 22 02:07:23 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1994 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Compute and print barycentric coordinates for triangle meshes
6   */
# Line 68 | Line 65 | FLOAT  *v1, *v2, *v3;
65                  vab[1] = v1[ax1] - v2[ax1];
66                  vcb[1] = v3[ax1] - v2[ax1];
67                  d = vcb[0]*vcb[0] + vcb[1]*vcb[1];
68 <                if (d <= FTINY)
68 >                if (d <= FTINY*FTINY)
69                          return(-1);
70                  d = (vcb[0]*vab[0]+vcb[1]*vab[1])/d;
71                  va[0] = vab[0] - vcb[0]*d;
72                  va[1] = vab[1] - vcb[1]*d;
73                  d = va[0]*va[0] + va[1]*va[1];
74 <                if (d <= FTINY)
74 >                if (d <= FTINY*FTINY)
75                          return(-1);
76                  bcm->tm[j][0] = va[0] /= d;
77                  bcm->tm[j][1] = va[1] /= d;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines