double operator [](int idx) { if (idx == 0) return left; if (idx == 1) return top; if (idx == 2) return right; if (idx == 3) return bottom; throw Exception('bad index'); }