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

Comparing ray/src/util/rad.c (file contents):
Revision 2.38 by greg, Sat Jan 1 12:12:32 1994 UTC vs.
Revision 2.39 by greg, Thu Mar 24 12:28:22 1994 UTC

# Line 850 | Line 850 | char   *po;
850                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
851                  badvalue(ZONE);
852          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
853 +        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
854 +                badvalue(ZONE);
855          getoctcube(org, &d);
856          d *= 3./(siz[0]+siz[1]+siz[2]);
857          switch (vscale(DETAIL)) {
# Line 916 | Line 918 | char   *po;
918                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
919                  badvalue(ZONE);
920          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
921 +        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
922 +                badvalue(ZONE);
923          getoctcube(org, &d);
924          d *= 3./(siz[0]+siz[1]+siz[2]);
925          switch (vscale(DETAIL)) {
# Line 985 | Line 989 | char   *po;
989                          &siz[0], &org[1], &siz[1], &org[2], &siz[2]) != 6)
990                  badvalue(ZONE);
991          siz[0] -= org[0]; siz[1] -= org[1]; siz[2] -= org[2];
992 +        if (siz[0] <= FTINY | siz[1] <= FTINY | siz[2] <= FTINY)
993 +                badvalue(ZONE);
994          getoctcube(org, &d);
995          d *= 3./(siz[0]+siz[1]+siz[2]);
996          switch (vscale(DETAIL)) {
# Line 1157 | Line 1163 | register char  *vs;
1163                          badvalue(ZONE);
1164                  for (i = 0; i < 3; i++) {
1165                          dim[i] -= cent[i];
1166 +                        if (dim[i] <= FTINY)
1167 +                                badvalue(ZONE);
1168                          cent[i] += .5*dim[i];
1169                  }
1170                  mult = vlet(ZONE)=='E' ? 2. : .45 ;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines