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

Comparing ray/src/gen/replmarks.c (file contents):
Revision 2.17 by greg, Tue Feb 2 18:02:32 2016 UTC vs.
Revision 2.18 by greg, Fri Feb 12 00:53:56 2021 UTC

# Line 23 | Line 23 | static const char RCSid[] = "$Id$";
23   #define  PI             3.14159265358979323846
24   #endif
25  
26 #define  FEQ(a,b)       ((a)-(b) <= 1e-7 && (b)-(a) <= 1e-7)
27
26   #define  MAXVERT        6       /* maximum number of vertices for markers */
27   #define  MAXMARK        128     /* maximum number of markers */
28  
# Line 401 | Line 399 | addrot(                /* compute rotation (x,y,z) => (xp,yp,zp) */
399          }
400          n = 0;
401          theta = atan2(yp[2], zp[2]);
402 <        if (!FEQ(theta,0.0)) {
402 >        if (!FABSEQ(theta,0.0)) {
403                  sprintf(xf, " -rx %f", theta*(180./PI));
404                  while (*xf) ++xf;
405                  n += 2;
406          }
407          theta = Asin(-xp[2]);
408 <        if (!FEQ(theta,0.0)) {
408 >        if (!FABSEQ(theta,0.0)) {
409                  sprintf(xf, " -ry %f", theta*(180./PI));
410                  while (*xf) ++xf;
411                  n += 2;
412          }
413          theta = atan2(xp[1], xp[0]);
414 <        if (!FEQ(theta,0.0)) {
414 >        if (!FABSEQ(theta,0.0)) {
415                  sprintf(xf, " -rz %f", theta*(180./PI));
416                  /* while (*xf) ++xf; */
417                  n += 2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines