Returns the given number unchanged.
SDK
- Xcode 9.0+
Framework
- Swift Standard Library
Declaration
Return Value
The given argument without any changes.
Discussion
You can use the unary plus operator (+
) to provide symmetry in your code for positive numbers when also using the unary minus operator.