Subtracts the lanes of b from those of a.
Integer lanes wrap on overflow, so unsigned lanes wrap below zero.
a := set(4, cast(s32) 3);
assert((a - set(4, cast(s32) 5)).data[0] == -2);
assert((a - cast(s32) 1).data[0] == 2);
assert((cast(s32) 10 - a).data[0] == 7);operator- :: (a: $T/SIMD_Array, b: T) -> T
Subtracts the lanes of b from those of a.
Integer lanes wrap on overflow, so unsigned lanes wrap below zero.
Parameters
- a: $T/SIMD_Array
- b: T
Returns
- T
a := set(4, cast(s32) 3);
assert((a - set(4, cast(s32) 5)).data[0] == -2);
assert((a - cast(s32) 1).data[0] == 2);
assert((cast(s32) 10 - a).data[0] == 7);operator- :: (a: $T/SIMD_Array, factor: a.type) -> T
Subtracts factor from every lane. The scalar can be on either side: scalar - vector subtracts every lane from the scalar.
Parameters
- a: $T/SIMD_Array
- factor: a.type
Returns
- T
operator- :: (factor: $E, a: SIMD_Array($N, E)) -> SIMD_Array(N, E)
Applies - with the scalar factor on the left: each lane of the result is factor - the lane of a.
Parameters
- factor: $E
- a: SIMD_Array($N, E)
Returns
- SIMD_Array(N, E)