From e3731ec7f52902f5f2fee4cda9141f50eb786c5a Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Mon, 23 Aug 2021 17:26:28 +0200 Subject: [PATCH] fix MarsenneTwisterURBG class --- vcg/complex/algorithms/point_sampling.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;