vector4Mapper
Maps the components of a 4-dimensional vector based on the specified dimension index.
Return
the value of the vector component corresponding to the specified dimension index
Parameters
v
the 4-dimensional vector containing the components x, y, z, and w
dimension
the index of the dimension to retrieve; 0 for x, 1 for y, 2 for z, and any other value for w