--- ray/src/cv/bsdf2klems.c 2014/03/12 22:24:59 2.14 +++ ray/src/cv/bsdf2klems.c 2014/08/21 10:33:48 2.15 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: bsdf2klems.c,v 2.14 2014/03/12 22:24:59 greg Exp $"; +static const char RCSid[] = "$Id: bsdf2klems.c,v 2.15 2014/08/21 10:33:48 greg Exp $"; #endif /* * Load measured BSDF interpolant and write out as XML file with Klems matrix. @@ -377,7 +377,7 @@ eval_rbf(void) sum += eval_rbfrep(rbf, vout); } fo_getvec(vout, j+.5, abp); /* use centered secant */ - bsdfarr[j*abp->nangles + i] = sum / (npsamps*vout[2]); + bsdfarr[j*abp->nangles + i] = sum / (double)npsamps; } if (rbf != NULL) free(rbf);