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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment