VX

Extract the first single-dimensional element from a vector
See also: VY VZ VW

Description


Like its sibling classes VY, VZ, VW, access a particular single-dimensional element of the provided vector, in this case the first element, commonly called x in computer graphics parlance.

Supported Rates: frame, shape, pixel

Class Methods


VX.fr(vec)

VX.sr(vec)

VX.pr(vec)

Make a VX VGen at requested rate.

Arguments

vec

The vector to extract the first element from.

Returns:

The first element in the vector.

dimensions

input

output

4

1

3

1

2

1

Examples


var v = VVec4.fr(1, 2, 3, 4);
var x = VX.fr(v); // x: 1