--- ray/src/common/rtmath.h 2003/06/27 06:53:21 3.1 +++ ray/src/common/rtmath.h 2013/02/08 16:10:07 3.6 @@ -1,20 +1,20 @@ -/* RCSid $Id: rtmath.h,v 3.1 2003/06/27 06:53:21 greg Exp $ */ +/* RCSid $Id: rtmath.h,v 3.6 2013/02/08 16:10:07 greg Exp $ */ /* * Header for Radiance vector and math routines */ #ifndef _RAD_RTMATH_H_ #define _RAD_RTMATH_H_ -#ifdef __cplusplus -extern "C" { -#endif #include -#include "tifftypes.h" - +#include "tiff.h" /* needed for int32, etc. */ #include "mat4.h" +#ifdef __cplusplus +extern "C" { +#endif + /* regular transformation */ typedef struct { MAT4 xfm; /* transform matrix */ @@ -33,6 +33,9 @@ typedef struct { #define PI 3.14159265358979323846 #endif #endif + /* defined in tcos.c */ +extern double tcos(double x); +extern double atan2a(double y, double x); #ifdef FASTMATH #define tcos cos @@ -43,14 +46,12 @@ typedef struct { #define tsin(x) tcos((x)-(PI/2.)) #define ttan(x) (tsin(x)/tcos(x)) #endif - /* defined in tcos.c */ -extern double tcos(double x); /* defined in xf.c */ extern int xf(XF *ret, int ac, char *av[]); extern int invxf(XF *ret, int ac, char *av[]); extern int fullxf(FULLXF *fx, int ac, char *av[]); /* defined in zeroes.c */ -extern int quadtratic(double *r, double a, double b, double c); +extern int quadratic(double *r, double a, double b, double c); /* defined in dircode.c */ extern int32 encodedir(FVECT dv); extern void decodedir(FVECT dv, int32 dc);