blob: fbb5dfba957cfd35ad8f4bf244e6f9e1e5fcc45a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include "vector.h"
struct DataCell {
double data[3][3];
inline double& get(int x, int y) {
return data[1+x][1-y];
}
inline double& get(Vector<int> v) {
return get(v[0], v[1]);
}
inline double get(int x, int y) const {
return data[1+x][1-y];
}
inline double get(Vector<int> v) const {
return get(v[0], v[1]);
}
};
|