Returns a vector with a in element position b.
d=vec_promote(a, b)
The following table describes the types of the returned value and the function arguments.
d | a | b |
---|---|---|
vector4double | double | int |
The result is a vector with a in element position b. This function uses modulo arithmetic on b to determine the element number. For example, if b is out of range, the compiler uses b modulo the number of elements in the vector to determine the element position. The other elements of the vector are undefined.
d[b MOD 4] = a
a = 50.0
b = 1
d: ( X, 50.0, Y, Z) // X, Y, and Z are undefined values