Creates a new instance initialized to the given value, if it can be represented without rounding.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
Parameters
other
The value to use for the new instance.
Discussion
If other
can’t be represented as an instance of Double
without rounding, the result of this initializer is nil
. In particular, passing NaN as other
always results in nil
.