Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0 Alpha
-
dc5bf4275b6d40aefac038d57b3aea62a8be3d12
Description
If qrand() call in Math.random() returns RAND_MAX, result is 1.0. Code in qml/jsruntime/qv4mathobject.cpp:
return Encode(qrand() / (double) RAND_MAX);
In Javascript, max value is exclusive:
http://www.w3schools.com/jsref/jsref_random.asp
Attachments
For Gerrit Dashboard: QTBUG-48753 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
138384,2 | JS: Math.random(): fix range to not include 1.0. | 5.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |