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

Comparing ray/src/util/cmatrix.c (file contents):
Revision 2.11 by greg, Wed Jul 22 04:23:27 2015 UTC vs.
Revision 2.14 by greg, Tue Feb 2 18:02:32 2016 UTC

# Line 11 | Line 11 | static const char RCSid[] = "$Id$";
11   #include "standard.h"
12   #include "cmatrix.h"
13   #include "platform.h"
14 < #include "rtprocess.h"
14 > #include "paths.h"
15   #include "resolu.h"
16  
17   const char      *cm_fmt_id[] = {
# Line 221 | Line 221 | cm_load(const char *inspec, int nrows, int ncols, int
221                          cm = cm_resize(cm, 2*cm->nrows);
222                      for (c = 0; c < ncols; c++) {
223                          COLORV  *cv = cm_lval(cm,r,c);
224 <                        if (fscanf(fp, COLSPEC, cv, cv+1, cv+2) != 3)
224 >                        if (fscanf(fp, COLSPEC, cv, cv+1, cv+2) != 3) {
225                                  if ((nrows <= 0) & (r > 0) & !c) {
226                                          cm = cm_resize(cm, maxrow=r);
227                                          break;
228                                  } else
229                                          goto EOFerror;
230 +                        }
231                      }
232                  }
233                  while ((c = getc(fp)) != EOF)
# Line 400 | Line 401 | cm_multiply(const CMATRIX *cm1, const CMATRIX *cm2)
401                  for (i = 0; i < cm1->ncols; i++) {
402                      const COLORV        *cp1 = cm_lval(cm1,dr,i);
403                      const COLORV        *cp2 = cm_lval(cm2,i,dc);
404 <                    res[0] += (double)cp1[0] * (double)cp2[0];
405 <                    res[1] += (double)cp1[1] * (double)cp2[1];
406 <                    res[2] += (double)cp1[2] * (double)cp2[2];
404 >                    res[0] += cp1[0] * cp2[0];
405 >                    res[1] += cp1[1] * cp2[1];
406 >                    res[2] += cp1[2] * cp2[2];
407                  }
408                  copycolor(dp, res);
409              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines