From a6e7bd4a00afba5aba43d937facc22bc5c7c6f00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Tue, 16 Jul 2013 12:49:27 +0200 Subject: [PATCH] unwrap: Use constants from math.h in C code. --- skimage/exposure/unwrap_2d_ljmu.c | 7 ++++--- skimage/exposure/unwrap_3d_ljmu.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/skimage/exposure/unwrap_2d_ljmu.c b/skimage/exposure/unwrap_2d_ljmu.c index 7ffcbeef..abc66451 100644 --- a/skimage/exposure/unwrap_2d_ljmu.c +++ b/skimage/exposure/unwrap_2d_ljmu.c @@ -17,13 +17,14 @@ #include #include #include +#include + +#define PI M_PI +#define TWOPI (2 * M_PI) //TODO: remove global variables //TODO: make thresholds independent -static float PI = 3.141592654f; -static float TWOPI = 6.283185307f; - #define NOMASK 0 #define MASK 1 diff --git a/skimage/exposure/unwrap_3d_ljmu.c b/skimage/exposure/unwrap_3d_ljmu.c index b8a44a73..99800410 100644 --- a/skimage/exposure/unwrap_3d_ljmu.c +++ b/skimage/exposure/unwrap_3d_ljmu.c @@ -19,9 +19,10 @@ #include #include #include +#include -static float PI = 3.141592654f; -static float TWOPI = 6.283185307f; +#define PI M_PI +#define TWOPI (2 * M_PI) #define NOMASK 0 #define MASK 1