From fd4e1324fef445e4a04b615327282ecbe6a9b8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Sat, 11 Mar 2006 20:51:46 +0000 Subject: moved definitions of float-intrinsics for osX<10.3 to iemmatrix.h svn path=/trunk/externals/iem/iemmatrix/; revision=4693 --- src/iemmatrix.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/iemmatrix.h') diff --git a/src/iemmatrix.h b/src/iemmatrix.h index 4080707..98c9da2 100644 --- a/src/iemmatrix.h +++ b/src/iemmatrix.h @@ -41,6 +41,9 @@ # ifndef MSW # define MSW # endif +# ifndef NT +# define NT +# endif # pragma warning( disable : 4244 ) # pragma warning( disable : 4305 ) @@ -63,12 +66,25 @@ # define fabsf fabs # define sqrtf sqrt # define powf pow +#endif +#ifdef __APPLE__ +# include +# if defined (MAC_OS_X_VERSION_10_3) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3 +# else +//float intrinsics not in math.h, so we define them here +# define sqrtf(v) (float)sqrt((double)(v)) +# define cosf(v) (float)cos((double)(v)) +# define sinf(v) (float)sin((double)(v)) +# define tanf(v) (float)tan((double)(v)) +# define logf(v) (float)log((double)(v)) +# define expf(v) (float)exp((double)(v)) +# define atan2f(v,p) (float)atan2((double)(v), (double)(p)) +# define powf(v,p) (float)pow((double)(v), (double)(p)) #endif typedef double t_matrixfloat; - /* the main class...*/ typedef struct _matrix { -- cgit v1.2.1