Instance Method インスタンスメソッド

replacing(with:where:)

Returns a copy of this vector, with elements replaced by elements of other in the lanes where mask is true. このベクターのコピーを返します、masktrueであるところの、レーンの中の要素otherを持ちます。

Declaration 宣言

func replacing(with other: SIMDMask<Storage>, where mask: SIMDMask<Storage>) -> SIMDMask<Storage>
Available when Storage is SIMD3<Int>. StorageSIMD3<Int>である時に利用可能です。

Discussion 解説

Equivalent to: 次に等しい:


var result = Self()
for i in indices {
  result[i] = mask[i] ? other[i] : self[i]
}