mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed a problem that "Random" doesn't return the HighBound value in CALC measure.
This commit is contained in:
parent
32db892e2c
commit
4cf4a84afb
@ -154,7 +154,7 @@ void CMeasureCalc::RandomFormulaReplace()
|
|||||||
{
|
{
|
||||||
if (wcsnicmp(L"Random", m_Formula.c_str() + loc, 6) == 0)
|
if (wcsnicmp(L"Random", m_Formula.c_str() + loc, 6) == 0)
|
||||||
{
|
{
|
||||||
int range = (m_HighBound - m_LowBound);
|
int range = (m_HighBound - m_LowBound) + 1;
|
||||||
srand((unsigned) rand());
|
srand((unsigned) rand());
|
||||||
int randNumber = m_LowBound + (range * rand()/(RAND_MAX + 1.0));
|
int randNumber = m_LowBound + (range * rand()/(RAND_MAX + 1.0));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user