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

Comparing ray/src/util/rmatrix.c (file contents):
Revision 2.13 by greg, Mon May 4 20:53:21 2015 UTC vs.
Revision 2.16 by greg, Wed Jul 22 04:29:56 2015 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10   #include <string.h>
11   #include <fcntl.h>
12   #include "resolu.h"
13 + #include "rtprocess.h"
14   #include "rmatrix.h"
15  
16   static char     rmx_mismatch_warn[] = "WARNING: data type mismatch\n";
# Line 46 | Line 47 | rmx_free(RMATRIX *rm)
47   int
48   rmx_newtype(int dtyp1, int dtyp2)
49   {
50 <        if ((dtyp1==DTxyze) | (dtyp1==DTrgbe) && dtyp1 != dtyp2)
50 >        if ((dtyp1==DTxyze) | (dtyp1==DTrgbe) |
51 >                        (dtyp2==DTxyze) | (dtyp2==DTrgbe)
52 >                        && dtyp1 != dtyp2)
53                  return(0);
54          if (dtyp1 < dtyp2)
55                  return(dtyp1);
# Line 511 | Line 514 | rmx_multiply(const RMATRIX *m1, const RMATRIX *m2)
514                  for (k = mres->ncomp; k--; ) {
515                      long double d = 0;
516                      for (h = m1->ncols; h--; )
517 <                        d += (long double)rmx_lval(m1,i,h,k) *
515 <                                (long double)rmx_lval(m2,h,j,k);
517 >                        d += rmx_lval(m1,i,h,k) * rmx_lval(m2,h,j,k);
518                      rmx_lval(mres,i,j,k) = (double)d;
519                  }
520          return(mres);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines