From 9e21f06404186eef42fe4891493bbaaac3f9ec9c Mon Sep 17 00:00:00 2001 From: Maria Dimashova Date: Tue, 7 Jun 2011 12:08:36 +0000 Subject: [PATCH] replaced M_PI by CV_PI --- modules/ml/src/em.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ml/src/em.cpp b/modules/ml/src/em.cpp index be51746acc..a8a223fa3b 100644 --- a/modules/ml/src/em.cpp +++ b/modules/ml/src/em.cpp @@ -470,7 +470,7 @@ double CvEM::calcLikelihood( const cv::Mat &input_sample ) const // probability = (2*pi)^(-dims/2)*exp( -0.5 * cur ) cvConvertScale( &expo, &expo, -0.5 ); - double factor = -double(dims)/2.0 * log(2.0*M_PI); + double factor = -double(dims)/2.0 * log(2.0*CV_PI); cvAndS( &expo, cvScalar(factor), &expo ); // Calculate the log-likelihood of the given sample - @@ -551,7 +551,7 @@ CvEM::predict( const CvMat* _sample, CvMat* _probs ) const // probability = (2*pi)^(-dims/2)*exp( -0.5 * cur ) cvConvertScale( &expo, &expo, -0.5 ); - double factor = -double(dims)/2.0 * log(2.0*M_PI); + double factor = -double(dims)/2.0 * log(2.0*CV_PI); cvAndS( &expo, cvScalar(factor), &expo ); // Calculate the posterior probability of each component