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

Comparing ray/src/cv/bsdf2rad.c (file contents):
Revision 2.36 by greg, Fri Jul 19 17:37:56 2019 UTC vs.
Revision 2.37 by greg, Fri Feb 12 00:53:56 2021 UTC

# Line 41 | Line 41 | const double   sph_xoffset = 15.;
41   #define bsdf_rad        (sph_rad*.25)
42   #define arrow_rad       (bsdf_rad*.015)
43  
44 #define FEQ(a,b)        ((a)-(b) <= 1e-7 && (b)-(a) <= 1e-7)
45
44   #define set_minlog()    overall_min = (overall_min < 1e-5) ? 1e-5 : overall_min; \
45                                  min_log10 = log10(overall_min) - .1
46  
# Line 348 | Line 346 | addrot(char *xf, const FVECT xp, const FVECT yp, const
346                  return(4);
347          }
348          theta = atan2(yp[2], zp[2]);
349 <        if (!FEQ(theta,0.0)) {
349 >        if (!FABSEQ(theta,0.0)) {
350                  sprintf(xf, " -rx %f", theta*(180./PI));
351                  while (*xf) ++xf;
352                  n += 2;
353          }
354          theta = Asin(-xp[2]);
355 <        if (!FEQ(theta,0.0)) {
355 >        if (!FABSEQ(theta,0.0)) {
356                  sprintf(xf, " -ry %f", theta*(180./PI));
357                  while (*xf) ++xf;
358                  n += 2;
359          }
360          theta = atan2(xp[1], xp[0]);
361 <        if (!FEQ(theta,0.0)) {
361 >        if (!FABSEQ(theta,0.0)) {
362                  sprintf(xf, " -rz %f", theta*(180./PI));
363                  /* while (*xf) ++xf; */
364                  n += 2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines