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

Comparing ray/src/cv/mgflib/mgf2inv.c (file contents):
Revision 1.4 by greg, Tue Dec 5 10:59:27 1995 UTC vs.
Revision 1.5 by greg, Wed Feb 5 14:53:33 1997 UTC

# Line 468 | Line 468 | char   **av;
468          va[1] = v2->p[1] - v1->p[1];
469          va[2] = v2->p[2] - v1->p[2];
470          length = sqrt(DOT(va,va));
471 <        angle = acos(va[1]/length);
471 >        if (va[1] >= length)
472 >                angle = 0.;
473 >        else if (va[1] <= -length)
474 >                angle = PI;
475 >        else
476 >                angle = acos(va[1]/length);
477          printf("%sTranslation { translation %13.9g %13.9g %13.9g }\n", tabs,
478                          .5*(v1->p[0]+v2->p[0]), .5*(v1->p[1]+v2->p[1]),
479                          .5*(v1->p[2]+v2->p[2]));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines