XYMap holds either a function or a look up table to map x, y coordinates to a 1D index.
| 17 | // XYMap holds either a function or a look up table to map x, y coordinates |
| 18 | // to a 1D index. |
| 19 | Fx2d(const XYMap &xyMap) : Fx(xyMap.getTotal()), mXyMap(xyMap) {} |
| 20 | u16 xyMap(u16 x, u16 y) const { |
| 21 | return mXyMap.mapToIndex(x, y); |
| 22 | } |