diff --git a/include/Algo/Histogram/histogram.h b/include/Algo/Histogram/histogram.h index feb971f336fe97269d43644481aacea7726e83d4..4406f3eff738cc8c6fd0e1d7a2a11dc513ac2e64 100644 --- a/include/Algo/Histogram/histogram.h +++ b/include/Algo/Histogram/histogram.h @@ -25,6 +25,10 @@ #ifndef __HISTOGRAM__ #define __HISTOGRAM__ +#define _USE_MATH_DEFINES +#include + + #include "Topology/generic/attributeHandler.h" #include "Topology/generic/cellmarker.h" #include "Geometry/vector_gen.h" diff --git a/src/Algo/Histogram/histogram.cpp b/src/Algo/Histogram/histogram.cpp index 9eddd9b43da056d6c2c090b430024db17fb9489f..c0a7cf63a4b95fc79a6d5458daa55fa5a2ea4dff 100644 --- a/src/Algo/Histogram/histogram.cpp +++ b/src/Algo/Histogram/histogram.cpp @@ -60,7 +60,7 @@ void Histogram::populateHisto(unsigned int nbclasses) { //compute nb classes if necesary if (nbclasses == 0) - m_nbclasses = (unsigned int)(sqrt(m_dataIdx.size())); + m_nbclasses = (unsigned int)(sqrt(double(m_dataIdx.size()))); else m_nbclasses = nbclasses;