diff --git a/vcg/complex/algorithms/point_sampling.h b/vcg/complex/algorithms/point_sampling.h index 1647e782..5436042c 100644 --- a/vcg/complex/algorithms/point_sampling.h +++ b/vcg/complex/algorithms/point_sampling.h @@ -506,9 +506,9 @@ class MarsenneTwisterURBG { public: typedef unsigned int result_type; - MarsenneTwisterURBG(result_type max) : _max(max) {} - result_type min() const {return 0;} - result_type max() const {return _max;} + MarsenneTwisterURBG(result_type max){_max = max;} + static result_type min() {return 0;} + static result_type max() {return std::numeric_limits::max();} result_type operator()() {return SamplingRandomGenerator().generate(_max);} private: result_type _max;