removed abs and sqrt ambiguities

This commit is contained in:
Paolo Cignoni 2009-01-18 23:56:28 +00:00
parent 0879d07401
commit 91968941c8
1 changed files with 3 additions and 2 deletions

View File

@ -92,6 +92,7 @@ Initial Release
#include <assert.h>
#include <string>
#include <limits>
#include <vcg/math/base.h>
namespace vcg {
@ -136,7 +137,7 @@ public:
ScalarType RMS(){ DirtyCheck(); return rms;}
//! Returns the variance of the data.
ScalarType Variance(){ return fabs(rms-avg*avg);}
ScalarType Variance(){ return math::Abs(rms-avg*avg);}
//! Returns the standard deviation of the data.
ScalarType StandardDeviation(){ return sqrt(Variance());}
@ -153,7 +154,7 @@ public:
avg += double(*vi);
rms += double(*vi)*double(*vi);
}
rms = sqrt(rms/double(vec.size()));
rms = math::Sqrt(rms/double(vec.size()));
avg = avg/double(vec.size());
dirty=false;
}