small fix for uniform
This commit is contained in:
parent
9af974070a
commit
a9468f38c9
1 changed files with 2 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ template <class T = double> class uniform_generator
|
||||||
throw logic_error("Min is greater than Max in uniform_generator");
|
throw logic_error("Min is greater than Max in uniform_generator");
|
||||||
}
|
}
|
||||||
|
|
||||||
T operator()(void) { return (T) minim+uniform.uniform(range); }
|
T operator()(void) { return minim+static_cast<T>(uniform.uniform(range)); }
|
||||||
|
|
||||||
private :
|
private :
|
||||||
T minim;
|
T minim;
|
||||||
T range;
|
T range;
|
||||||
|
|
|
||||||
Reference in a new issue