A Boolean value indicating whether the instance is equal to zero.
SDK
- Xcode 6.0.1+
Framework
- Swift Standard Library
Declaration
var isZero: Bool { get }
Discussion
The is property of a value x is true when x represents either -0 or +0. x is equivalent to the following comparison: x == 0.
let x = -0.0
x.isZero // true
x == 0.0 // true