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

Comparing ray/src/common/fvect.h (file contents):
Revision 2.19 by greg, Fri Feb 12 00:41:18 2021 UTC vs.
Revision 2.22 by greg, Mon Dec 13 21:05:00 2021 UTC

# Line 19 | Line 19 | extern "C" {
19   #endif
20   #define  FHUGE          (1e10)
21  
22 < #define  FABSEQ(x1,x2)  ((x1)+FTINY > (x2) && (x2)+FTINY > (x1))
23 < #define  FRELEQ(x1,x2)  ((x1)*(1.+FTINY) >= (x2) && (x2)*(1.+FTINY) >= (x1))
22 > #define  FABSEQ(x1,x2)  (fabs((x1)-(x2)) <= FTINY)
23 > #define  FRELEQ(x1,x2)  (fabs((x1)-(x2)) <= FTINY*0.5*(fabs(x1)+fabs(x2)))
24  
25   #define  VABSEQ(v,w)    (FABSEQ((v)[0],(w)[0]) && FABSEQ((v)[1],(w)[1]) \
26                                  && FABSEQ((v)[2],(w)[2]))
# Line 41 | Line 41 | typedef RREAL  FVECT[3];
41   #define  VSUM(vr,v1,v2,f)       ((vr)[0]=(v1)[0]+(f)*(v2)[0], \
42                                  (vr)[1]=(v1)[1]+(f)*(v2)[1], \
43                                  (vr)[2]=(v1)[2]+(f)*(v2)[2])
44 + #define  VLERP(vr,v1,a,v2)      ((vr)[0]=(1.-(a))*(v1)[0]+(a)*(v2)[0], \
45 +                                (vr)[1]=(1.-(a))*(v1)[1]+(a)*(v2)[1], \
46 +                                (vr)[2]=(1.-(a))*(v1)[2]+(a)*(v2)[2])
47   #define  VCROSS(vr,v1,v2) \
48                          ((vr)[0]=(v1)[1]*(v2)[2]-(v1)[2]*(v2)[1], \
49                          (vr)[1]=(v1)[2]*(v2)[0]-(v1)[0]*(v2)[2], \
# Line 67 | Line 70 | extern void    spinvector(FVECT vres, const FVECT vorig,
70                          const FVECT vnorm, double theta);
71   extern double   geodesic(FVECT vres, const FVECT vorig,
72                          const FVECT vtarg, double t, int meas);
73 +                                /* defined in disk2square.c */
74 + extern void     SDsquare2disk(double ds[2], double seedx, double seedy);
75 + extern void     SDdisk2square(double sq[2], double diskx, double disky);
76   #ifdef __cplusplus
77   }
78   #endif
79   #endif /* _RAD_FVECT_H_ */
74

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines