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

Comparing ray/src/util/rmtxop.c (file contents):
Revision 2.37 by greg, Fri Apr 4 01:48:25 2025 UTC vs.
Revision 2.40 by greg, Fri Apr 4 22:47:56 2025 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10   #include "rmatrix.h"
11   #include "platform.h"
12  
13 #ifndef MAXCOMP
14 #define MAXCOMP         MAXCSAMP        /* #components we support */
15 #endif
16
13   /* Unary matrix operation(s) */
14   typedef struct {
15          double          cmat[MAXCOMP*MAXCOMP];  /* component transformation */
# Line 680 | Line 676 | main(int argc, char *argv[])
676          mres = loadop(mop+nmats);
677          if (mres == NULL)
678                  return(1);
679 <        if (outfmt == DTfromHeader)     /* check data type */
679 >        if ((outfmt == DTfromHeader) & (mres->dtype < DTspec))
680                  outfmt = mres->dtype;
681 <        if (outfmt == DTrgbe) {
681 >        if (outfmt == DTrgbe) {         /* check data type */
682                  if (mres->ncomp > 3)
683                          outfmt = DTspec;
684                  else if (mres->dtype == DTxyze)
685                          outfmt = DTxyze;
686          }
687 + #if DTrmx_native==DTfloat
688 +        if (outfmt == DTdouble)
689 +                fprintf(stderr,
690 +                        "%s: warning - writing float result as double\n",
691 +                                argv[0]);
692 + #endif
693          newheader("RADIANCE", stdout);  /* write result to stdout */
694          printargs(argc, argv, stdout);
695          return(rmx_write(mres, outfmt, stdout) ? 0 : 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines