| 163 | * Index a tile array by a 2D coordinate, clipping it to mod 16. |
| 164 | */ |
| 165 | template<class T> inline auto index_tile(T &v, df::coord2d p) |
| 166 | -> typename std::add_rvalue_reference<decltype(v[0][0])>::type |
| 167 | { |
| 168 | return v[p.x&15][p.y&15]; |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Check if a 2D coordinate is in the 0-15 range. |
no outgoing calls
no test coverage detected