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

Comparing ray/src/cv/mgf2inv.c (file contents):
Revision 2.3 by greg, Tue May 15 15:36:33 2012 UTC vs.
Revision 2.4 by greg, Thu Mar 6 00:40:37 2014 UTC

# Line 486 | Line 486 | i_cyl(                 /* translate a cylinder description */
486          va[0] = v2->p[0] - v1->p[0];
487          va[1] = v2->p[1] - v1->p[1];
488          va[2] = v2->p[2] - v1->p[2];
489 <        length = sqrt(DOT(va,va));
490 <        if (va[1] >= length)
491 <                angle = 0.;
492 <        else if (va[1] <= -length)
493 <                angle = PI;
494 <        else
495 <                angle = acos(va[1]/length);
489 >        length = VLEN(va);
490 >        angle = Acos(va[1]/length);
491          printf("%sTranslation { translation %13.9g %13.9g %13.9g }\n", tabs,
492                          .5*(v1->p[0]+v2->p[0]), .5*(v1->p[1]+v2->p[1]),
493                          .5*(v1->p[2]+v2->p[2]));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines