| 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])) |
| 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], \ |
| 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 square2disk(RREAL ds[2], double seedx, double seedy); |
| 75 |
+ |
extern void disk2square(RREAL sq[2], double diskx, double disky); |
| 76 |
|
#ifdef __cplusplus |
| 77 |
|
} |
| 78 |
|
#endif |
| 79 |
|
#endif /* _RAD_FVECT_H_ */ |
| 74 |
– |
|