vec.get( vector1 as vec.vector, k as Number ) as Number
Returns the element at the k-th index of the vector.
Parameters | |
---|---|
vector1 | The vector to grab the k-th element of. |
k |
The zero-based index of vector1 to return. If k is greater than the number of elements in the vector,
throw VEC-OUTOFBOUNDS .
|
const vec1 = vec.vector([3.14,1.59,2.65]) vec.get(vec1, 2) => 2.65