setAt method

void setAt(
  1. int index,
  2. double value
)

Implementation

void setAt(int index, double value) {
  if (index == 0) {
    x = value;
  } else if (index == 1) {
    y = value;
  } else {
    throw RangeError('index out of range');
  }
}