Get the opposite SIMDMask

I have a SIMDMask as follows:

let vectorA = SIMD3<Float>(0, 0, 0)
let vectorB = SIMD3<Float>(1, 1, 1)
let mask = vectorA .< vectorB // (true, true, true)

// This of course doesn't work, but is there something that will flip this mask for me?
let oppositeMask = !mask // (false, false, false)

I could try an element wise .!= comparison with itself, but maybe there is a better way since I don't actually want to compare anything, I just want to flip all of the elements.

The operator I was looking for was .!
:slight_smile:

1 Like