Returns the value of element a from the vector b.
d=vec_extract(a, b)
The following table describes the types of the returned value and the function arguments.
d | a | b |
---|---|---|
double | vector4double | int |
This function uses the 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.
d = a[b MOD 4]
a = (10.0, 20.0, 30.0, 40.0)
b = 1
d: 20.0