Instance Property インスタンスプロパティ

isZero

A Boolean value indicating whether the instance is equal to zero. このインスタンスがゼロと等しいかどうかを指し示すブール値。

Declaration 宣言

var isZero: Bool { get }

Discussion 解説

The isZero property of a value x is true when x represents either -0.0 or +0.0. x.isZero is equivalent to the following comparison: x == 0.0. ある値xisZeroプロパティがtrueであるのは、x-0.0または+0.0のどちらかを表す場合です。x.isZeroは次の比較に相当するものです:x == 0.0


let x = -0.0
x.isZero        // true
x == 0.0        // true

Relationships 関係

From Protocol 由来プロトコル

See Also 参照

Querying a Float's State Floatの状態を問い合わせる