Skip to content
Browse files

Fixed warning in gaussian noise generator

  • Loading branch information...
1 parent 1dcd556 commit e6e9e71d26a8d46a43add23ad21ea888234b00bf @dvvrd dvvrd committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 qrutils/mathUtils/gaussNoise.cpp
View
2 qrutils/mathUtils/gaussNoise.cpp
@@ -41,7 +41,7 @@ qreal GaussNoise::genBody(unsigned int const approximationLevel, qreal const var
qreal x = 0.0;
for (unsigned int i = 0; i < approximationLevel; ++i) {
- x += static_cast<qreal>(qrand()) / static_cast<unsigned int>(RAND_MAX + 1);
+ x += static_cast<qreal>(qrand()) / static_cast<unsigned int>(RAND_MAX) + 1;
}
x -= approximationLevel * mu;

0 comments on commit e6e9e71

Please sign in to comment.
Something went wrong with that request. Please try again.