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

Comparing ray/src/common/xf.c (file contents):
Revision 1.7 by greg, Wed Oct 18 23:15:37 1989 UTC vs.
Revision 1.8 by greg, Tue Feb 20 18:02:30 1990 UTC

# Line 32 | Line 32 | char  *av[];
32          setident4(retmat);
33          *retsca = 1.0;
34  
35 +        icnt = 1;
36          setident4(xfmat);
37          xfsca = 1.0;
38  
# Line 108 | Line 109 | char  *av[];
109  
110                  case 'i':                       /* iterate */
111                          checkarg(2,1);
111                        icnt = atoi(av[++i]);
112                          while (icnt-- > 0) {
113                                  multmat4(retmat, retmat, xfmat);
114                                  *retsca *= xfsca;
115                          }
116 +                        icnt = atoi(av[++i]);
117                          setident4(xfmat);
118                          xfsca = 1.0;
119 <                        break;
119 >                        continue;
120  
121                  default:
122                          return(i);
# Line 124 | Line 125 | char  *av[];
125                  multmat4(xfmat, xfmat, m4);
126          }
127   done:
128 <        multmat4(retmat, retmat, xfmat);
129 <        *retsca *= xfsca;
128 >        while (icnt-- > 0) {
129 >                multmat4(retmat, retmat, xfmat);
130 >                *retsca *= xfsca;
131 >        }
132          return(i);
133   }
134  
# Line 146 | Line 149 | char  *av[];
149          setident4(retmat);
150          *retsca = 1.0;
151  
152 +        icnt = 1;
153          setident4(xfmat);
154          xfsca = 1.0;
155  
# Line 222 | Line 226 | char  *av[];
226  
227                  case 'i':                       /* iterate */
228                          checkarg(2,1);
225                        icnt = atoi(av[++i]);
229                          while (icnt-- > 0) {
230                                  multmat4(retmat, xfmat, retmat);
231                                  *retsca *= xfsca;
232                          }
233 +                        icnt = atoi(av[++i]);
234                          setident4(xfmat);
235                          xfsca = 1.0;
236                          break;
# Line 238 | Line 242 | char  *av[];
242                  multmat4(xfmat, m4, xfmat);     /* left multiply */
243          }
244   done:
245 <        multmat4(retmat, xfmat, retmat);
246 <        *retsca *= xfsca;
245 >        while (icnt-- > 0) {
246 >                multmat4(retmat, xfmat, retmat);
247 >                *retsca *= xfsca;
248 >        }
249          return(i);
250   }
251   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines