Update of /cvsroot/pure-data/externals/iem/iemmatrix/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13697
Modified Files: iemmatrix.h mtx_pow.c Log Message: moved definitions of float-intrinsics for osX<10.3 to iemmatrix.h
Index: iemmatrix.h =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/iemmatrix.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** iemmatrix.h 16 Jun 2005 12:43:07 -0000 1.9 --- iemmatrix.h 11 Mar 2006 20:51:45 -0000 1.10 *************** *** 42,45 **** --- 42,48 ---- # define MSW # endif + # ifndef NT + # define NT + # endif
# pragma warning( disable : 4244 ) *************** *** 64,73 **** # define sqrtf sqrt # define powf pow
#endif
typedef double t_matrixfloat;
- /* the main class...*/ typedef struct _matrix --- 67,89 ---- # define sqrtf sqrt # define powf pow + #endif
+ #ifdef __APPLE__ + # include <AvailabilityMacros.h> + # 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
Index: mtx_pow.c =================================================================== RCS file: /cvsroot/pure-data/externals/iem/iemmatrix/src/mtx_pow.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mtx_pow.c 11 May 2005 13:05:29 -0000 1.1 --- mtx_pow.c 11 Mar 2006 20:51:46 -0000 1.2 *************** *** 17,28 **** /* LATER: do a mtx_pow, mtx_^ */
- #ifdef __APPLE__ - /* there is no such thing like powf on apple... */ - static inline float powf (float v, float p) - { - return (float) pow((double)v, (double) p); - } - #endif /* __APPLE__ */ - static t_class *mtx_powelement_class, *mtx_powscalar_class;
--- 17,20 ----