--- ray/src/util/rfluxmtx.c 2016/08/20 03:36:04 2.40 +++ ray/src/util/rfluxmtx.c 2016/12/22 17:28:06 2.42 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rfluxmtx.c,v 2.40 2016/08/20 03:36:04 greg Exp $"; +static const char RCSid[] = "$Id: rfluxmtx.c,v 2.42 2016/12/22 17:28:06 greg Exp $"; #endif /* * Calculate flux transfer matrix or matrices using rcontrib @@ -64,7 +64,7 @@ typedef struct { FVECT uva[2]; /* tangent axes */ int ntris; /* number of triangles */ struct ptri { - float afrac; /* fraction of total area */ + double afrac; /* fraction of total area */ short vndx[3]; /* vertex indices */ } tri[1]; /* triangle array (extends struct) */ } POLYTRIS; /* triangulated polygon */ @@ -1305,7 +1305,11 @@ main(int argc, char *argv[]) fputs(": -i, -I supported for pass-through only\n", stderr); return(1); } - fmtopt[2] = (sizeof(RREAL)==sizeof(double)) ? 'd' : 'f'; +#ifdef SMLFLT + fmtopt[2] = 'f'; +#else + fmtopt[2] = 'd'; +#endif if (sampcnt <= 0) sampcnt = 10000; } sprintf(sampcntbuf, "%d", sampcnt);