From 30ecb28877b98f7916917ebf98c22d7c35ec44fa Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Mon, 5 Sep 2011 09:25:10 +0000 Subject: [PATCH] fixed build under windows (replace M_PI with CV_PI) --- modules/imgproc/src/phasecorr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/imgproc/src/phasecorr.cpp b/modules/imgproc/src/phasecorr.cpp index c8c12822a7..24b28e4592 100644 --- a/modules/imgproc/src/phasecorr.cpp +++ b/modules/imgproc/src/phasecorr.cpp @@ -318,10 +318,10 @@ void cv::createHanningWindow(OutputArray _dst, cv::Size winSize, int type) for(int i = 0; i < rows; i++) { - double wr = 0.5 * (1.0f - cos(2.0f * M_PI * (double)i / (double)(rows - 1))); + double wr = 0.5 * (1.0f - cos(2.0f * CV_PI * (double)i / (double)(rows - 1))); for(int j = 0; j < cols; j++) { - double wc = 0.5 * (1.0f - cos(2.0f * M_PI * (double)j / (double)(cols - 1))); + double wc = 0.5 * (1.0f - cos(2.0f * CV_PI * (double)j / (double)(cols - 1))); dstData[i*cols + j] = wr * wc; } } @@ -335,10 +335,10 @@ void cv::createHanningWindow(OutputArray _dst, cv::Size winSize, int type) for(int i = 0; i < rows; i++) { - double wr = 0.5 * (1.0 - cos(2.0 * M_PI * (double)i / (double)(rows - 1))); + double wr = 0.5 * (1.0 - cos(2.0 * CV_PI * (double)i / (double)(rows - 1))); for(int j = 0; j < cols; j++) { - double wc = 0.5 * (1.0 - cos(2.0 * M_PI * (double)j / (double)(cols - 1))); + double wc = 0.5 * (1.0 - cos(2.0 * CV_PI * (double)j / (double)(cols - 1))); dstData[i*cols + j] = wr * wc; } }