Creates a new value from the given floating-point literal.
SDK
- Xcode 6.1+
Framework
- Swift Standard Library
Declaration
Parameters
value
The new floating-point value.
Discussion
Do not call this initializer directly. It is used by the compiler when you create a new Double
instance by using a floating-point literal. Instead, create a new value by using a literal.
In this example, the assignment to the x
constant calls this initializer behind the scenes.