Blob Blame History Raw
diff --git a/vcglib/vcg/complex/algorithms/create/resampler.h b/vcglib/vcg/complex/algorithms/create/resampler.h
index a7f599e..f7f01fb 100644
--- a/vcglib/vcg/complex/algorithms/create/resampler.h
+++ b/vcglib/vcg/complex/algorithms/create/resampler.h
@@ -23,6 +23,7 @@
 #ifndef __VCG_MESH_RESAMPLER
 #define __VCG_MESH_RESAMPLER
 
+#include <algorithm>
 #include <vcg/complex/algorithms/update/normal.h>
 #include <vcg/complex/algorithms/update/flag.h>
 #include <vcg/complex/algorithms/update/bounding.h>
@@ -253,7 +254,7 @@ template <class OLD_MESH_TYPE,class NEW_MESH_TYPE, class FLT, class DISTFUNCTOR
 		*/
 		void ComputeConsensus(int slice, field_value *slice_values)
 		{
-			float max_dist = min(min(this->voxel[0],this->voxel[1]),this->voxel[2]);
+			float max_dist = std::min(std::min(this->voxel[0],this->voxel[1]),this->voxel[2]);
 			int flippedCnt=0;
 			int flippedTot=0;
 			int flippedTimes=0;