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.30 by greg, Fri Oct 19 00:21:31 2018 UTC vs.
Revision 2.31 by greg, Mon Aug 12 04:12:57 2019 UTC

# Line 466 | Line 466 | rmx_transpose(const RMATRIX *rm)
466  
467          if (rm == NULL)
468                  return(0);
469 +        if ((rm->nrows == 1) | (rm->ncols == 1)) {
470 +                dnew = rmx_copy(rm);
471 +                dnew->nrows = rm->ncols;
472 +                dnew->ncols = rm->nrows;
473 +                return(dnew);
474 +        }
475          dnew = rmx_alloc(rm->ncols, rm->nrows, rm->ncomp);
476          if (dnew == NULL)
477                  return(NULL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines