Fix compiling on MSVC - M_PI undefined
authorJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2016 13:31:13 +0000 (01:31 +1200)
committerJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2016 13:31:13 +0000 (01:31 +1200)
extern/curve_fit_nd/intern/curve_fit_cubic.c

index 8fc7198..8261950 100644 (file)
 
 #include "../curve_fit_nd.h"
 
+/* Fix for compiling on MSVC */
+#ifndef M_PI
+#define M_PI        3.14159265358979323846  /* pi */
+#endif
+
+
 /* Take curvature into account when calculating the least square solution isn't usable. */
 #define USE_CIRCULAR_FALLBACK