operator []= method

void operator []=(
  1. int i,
  2. double v
)

Implementation

void operator []=(int i, double v) {
  if(i == 0) x = v;
  if(i == 1) y = v;
}