Type Property 型プロパティ

pi

The mathematical constant pi. 数学の定数pi。

Declaration 宣言

static var pi: Float { get }

Discussion 解説

This value should be rounded toward zero to keep user computations with angles from inadvertently ending up in the wrong quadrant. A type that conforms to the FloatingPoint protocol provides the value for pi at its best possible precision. この値は、角度を伴うユーザ計算がうっかりして間違った象限に終わらないようにゼロへと丸められるべきです。FloatingPointプロトコルに準拠する型は、piに対する値をそれの最もよい可能な精度で提供します。


print(Double.pi)
// Prints "3.14159265358979"

Relationships 関係

From Protocol 由来プロトコル

See Also 参照

Accessing Numeric Constants 数に関する定数にアクセスする