--- ray/src/common/dircode.c 2003/06/07 12:50:20 2.4 +++ ray/src/common/dircode.c 2003/06/21 14:48:53 2.6 @@ -1,8 +1,8 @@ #ifndef lint -static const char RCSid[] = "$Id: dircode.c,v 2.4 2003/06/07 12:50:20 schorsch Exp $"; +static const char RCSid[] = "$Id: dircode.c,v 2.6 2003/06/21 14:48:53 greg Exp $"; #endif /* - * Compute a 4-byte direction code (int4 type defined in standard.h). + * Compute a 4-byte direction code (int32 type defined in standard.h). * * Mean accuracy is 0.0022 degrees, with a maximum error of 0.0058 degrees. */ @@ -19,11 +19,11 @@ static const char RCSid[] = "$Id: dircode.c,v 2.4 2003 #define F2SFT 18 #define FMASK 0x1fff -int4 +int32 encodedir(dv) /* encode a normalized direction vector */ FVECT dv; { - register int4 dc = 0; + register int32 dc = 0; int cd[3], cm; register int i; @@ -33,6 +33,8 @@ FVECT dv; dc |= FXNEG<>F1SFT & FMASK)+.5)*(1./DCSCALE); d2 = ((dc>>F2SFT & FMASK)+.5)*(1./DCSCALE); der = sqrt(1. - d1*d1 - d2*d2); @@ -77,7 +83,7 @@ register int4 dc; double dir2diff(dc1, dc2) /* approx. radians^2 between directions */ -int4 dc1, dc2; +int32 dc1, dc2; { FVECT v1, v2; @@ -90,7 +96,7 @@ int4 dc1, dc2; double fdir2diff(dc1, v2) /* approx. radians^2 between directions */ -int4 dc1; +int32 dc1; register FVECT v2; { FVECT v1;