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.54 by greg, Sat Mar 5 15:33:09 2022 UTC vs.
Revision 2.55 by greg, Sun Mar 6 17:21:49 2022 UTC

# Line 563 | Line 563 | RMATRIX *
563   rmx_transpose(const RMATRIX *rm)
564   {
565          RMATRIX *dnew;
566 <        int     i, j, k;
566 >        int     i, j;
567  
568          if (!rm)
569                  return(0);
# Line 585 | Line 585 | rmx_transpose(const RMATRIX *rm)
585          dnew->dtype = rm->dtype;
586          for (i = dnew->nrows; i--; )
587              for (j = dnew->ncols; j--; )
588 <                memcpy(rmx_lval(dnew,i,j), rmx_lval(rm,i,j),
588 >                memcpy(rmx_lval(dnew,i,j), rmx_lval(rm,j,i),
589                                  sizeof(double)*dnew->ncomp);
590          return(dnew);
591   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines