operator [] method

dynamic operator [](
  1. int index
)

Implementation

operator [](int index) {
  switch (index) {
    case 1:
      return x;
    case 2:
      return y;
    case 3:
      return z;
    default:
      throw new IndexError(index, this, null, null, 3);
  }
}