- fixed the RandomNumberGenerator, where it numbers greater than 1.0 could be returned

- activated the corresponding unit tests

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@727 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Isaak Lim
2012-10-01 09:12:43 +00:00
parent 849ee4d293
commit 4a49deb7ad
2 changed files with 5 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ namespace OpenMesh {
RandomNumberGenerator::RandomNumberGenerator(const double _resolution) :
resolution_(_resolution),
iterations_(1),
maxNum_(RAND_MAX)
maxNum_(RAND_MAX + 1.0)
{
double tmp = resolution_;
while (tmp > (double(RAND_MAX) + 1.0) ) {