Operator 演算子

+(_:_:)

Adds two values and produces their sum. 2つの値を加算してそれらの合計を生成します。

Declaration 宣言

static func + (lhs: AnimatablePair<First, Second>, rhs: AnimatablePair<First, Second>) -> AnimatablePair<First, Second>

Parameters パラメータ

lhs

The first value to add. 加算する第1の値。

rhs

The second value to add. 加算する第2の値。

Discussion 議論

The addition operator (+) calculates the sum of its two arguments. For example: 例えば:


1 + 2                   // 3
-10 + 15                // 5
-15 + -5                // -20
21.5 + 3.25             // 24.75

You cannot use + with arguments of different types. To add values of different types, convert one of the values to the other value’s type.


let x: Int8 = 21
let y: Int = 1000000
Int(x) + y              // 1000021

See Also 参照

Manipulating Animations