Commit 112ab6f9 authored by Guolin Ke's avatar Guolin Ke Committed by GitHub
Browse files

fix one bug in NextInt

parent aeeef276
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
* \return The random integer between [lower_bound, upper_bound) * \return The random integer between [lower_bound, upper_bound)
*/ */
inline int NextInt(int lower_bound, int upper_bound) { inline int NextInt(int lower_bound, int upper_bound) {
return (next()) % (upper_bound - lower_bound + 1) + lower_bound; return (next()) % (upper_bound - lower_bound) + lower_bound;
} }
/*! /*!
* \brief Generate random float data * \brief Generate random float data
......
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