Commit 30ecb288 authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

fixed build under windows (replace M_PI with CV_PI)

parent bcec7a7e
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment