vector4Mapper

fun vector4Mapper(v: Vector4, dimension: Int): Double(source)

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