removed abs and sqrt ambiguities
This commit is contained in:
parent
0879d07401
commit
91968941c8
|
@ -92,6 +92,7 @@ Initial Release
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
#include <vcg/math/base.h>
|
||||||
|
|
||||||
|
|
||||||
namespace vcg {
|
namespace vcg {
|
||||||
|
@ -136,7 +137,7 @@ public:
|
||||||
ScalarType RMS(){ DirtyCheck(); return rms;}
|
ScalarType RMS(){ DirtyCheck(); return rms;}
|
||||||
|
|
||||||
//! Returns the variance of the data.
|
//! 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.
|
//! Returns the standard deviation of the data.
|
||||||
ScalarType StandardDeviation(){ return sqrt(Variance());}
|
ScalarType StandardDeviation(){ return sqrt(Variance());}
|
||||||
|
@ -153,7 +154,7 @@ public:
|
||||||
avg += double(*vi);
|
avg += double(*vi);
|
||||||
rms += double(*vi)*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());
|
avg = avg/double(vec.size());
|
||||||
dirty=false;
|
dirty=false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue