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

Comparing ray/src/common/fvect.c (file contents):
Revision 2.20 by greg, Thu Dec 4 05:26:27 2014 UTC vs.
Revision 2.21 by greg, Mon Dec 8 23:51:12 2014 UTC

# Line 106 | Line 106 | const FVECT v1,
106   const FVECT v2
107   )
108   {
109 +        if ((vres == v1) | (vres == v2)) {
110 +                FVECT   vtmp;
111 +                VCROSS(vtmp, v1, v2);
112 +                VCOPY(vres, vtmp);
113 +                return;
114 +        }
115          VCROSS(vres, v1, v2);
116   }
117  
# Line 151 | Line 157 | FVECT  v
157  
158   int
159   getperpendicular(               /* choose random perpedicular direction */
160 <        FVECT vp,                       /* returns normalized */
161 <        const FVECT v                   /* input vector must be normalized */
160 > FVECT vp,                               /* returns normalized */
161 > const FVECT v                           /* input vector must be normalized */
162   )
163   {
164          FVECT   v1;
# Line 167 | Line 173 | getperpendicular(              /* choose random perpedicular direc
173          if (i < 0)
174                  return(0);
175          v1[i] = 1.0;
176 <        VCROSS(vp, v1, v);
176 >        fcross(vp, v1, v);
177          return(normalize(vp) > 0.0);
178   }
179 +
180  
181   int
182   closestapproach(                        /* closest approach of two rays */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines