operator [] method
A coordinate value by the coordinate axis index i
.
Returns zero when a coordinate axis is not available.
For scalable coordinates, the coordinate ordering is: (zoom, x, y)
Implementation
int operator [](int i) {
switch (i) {
case 0:
return zoom;
case 1:
return x;
case 2:
return y;
default:
return 0;
}
}