aboutsummaryrefslogtreecommitdiff
path: root/src/iemmatrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/iemmatrix.h')
-rw-r--r--src/iemmatrix.h18
1 files changed, 17 insertions, 1 deletions
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 <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
{