getX method

num? getX(
  1. int index
)

Returns the x component of the vector at the given index.

Implementation

num? getX(int index) {
  return getAt(index * itemSize);
}