We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4510de7 commit be7645cCopy full SHA for be7645c
modules/MetaFilters/iASamplingMethodImpl.cpp
@@ -83,7 +83,7 @@ class iAIntRandom: public iARandomGenerator
83
m_max(max),
84
m_isLog(isLog)
85
{}
86
- //! return a random number between 0 and max-1, uniformly distributed
+ //! return a random number between min and max, uniformly distributed
87
QVariant next() override
88
{
89
double randMin = m_isLog ? std::log(m_min) : m_min;
@@ -102,7 +102,7 @@ class iACategoryRandom : public iARandomGenerator
102
public:
103
iACategoryRandom(QStringList const & options):
104
m_options(options),
105
- m_intRandom(0, static_cast<int>(options.size()), false)
+ m_intRandom(0, static_cast<int>(options.size()-1), false)
106
107
108
0 commit comments