The Swift 4.2.0 release is now in final convergence. This means the release will only take critical changes at this point. If there is a change you need to take, please email or direct message me.
Convergence snapshots can be found here:
Swift.org - Download Swift
swift-4.2-branch is now open take changes that aren't critical for 4.2.0 but are considered worth pulling in for a potential 4.2.1 release at some point in the future. These changes will not go into 4.2.0 unless specifically requested (see above).
The documentation for
really needs to be updated to state that the algorithm is subject to change before 4.2.
The discussion section of the
static func random(in range: Range<Float>) -> Float
The random() static method chooses a random value from a continuous uniform distribution in range, and then converts that value to the nearest representable value in this type. Depending on the size and span of range, some concrete values may be represented more frequently than others.
Unless I'm misinterpreting this, the process described would let any representable value within the gi…