Kaydet (Commit) 1b226b02 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Don't call comphelper::rng::uniform_real_distribution(a,b) with a==b

Change-Id: I95a3ac8da83e02001de13af8d31a04fe0d654dc0
üst 4bb67e66
...@@ -171,6 +171,8 @@ double timerCurrent(timer* mytimer) ...@@ -171,6 +171,8 @@ double timerCurrent(timer* mytimer)
/* Random number generator */ /* Random number generator */
double random(double min, double max) double random(double min, double max)
{ {
if (min == max)
return min;
return comphelper::rng::uniform_real_distribution(min, max); return comphelper::rng::uniform_real_distribution(min, max);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment