Search Issue Tracker
By Design
Votes
0
Found in
5.5.1f1
Issue ID
902378
Regression
No
Random.value does not return 0.0f or 1.0f
To reproduce:
1. Open attached Unity project "randomvalue.zip"
2. Open "doesnotreturn" scene
3. Go into Play mode
Expected result: By description, Random.value should include values from 0.0f to 1.0f [inclusive] , which means it should be possible to get 0.0f and 1.0f as a Random.value,
Actual result: it is impossible to get either of these values in any version of Unity.
Note: I attached a project which has a script. In that script I have made a loop that is generating random.value until it reaches either 0.0f or 1.0f.
pressing Play freezes Unity, which means that the loop is infinite which means Random.value never gets a value of 0.0f or 1.0f.
Reproduced on: 5.5.4p2, 5.6.2p3, 2017.1.0p2, 2017.2.0b4, 2017.3.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UI Toolkit 'background-size' property is not fully animatable
- Moving the Scrollbar via clicking no longer works after the first-click when page size is too small
- Elements in UI Builder Viewport are displayed incorrectly when Editor UI Scaling is set to 125%
- Prefab referencing a script is not shown in the Search window's Project tab when using "Find References In Project"
- Scroll view sensitivity remains unchanged when modifying the "--unity-metrics-single_line-height" value
Add comment