* Gets the biggest distance component (x or y) between the two given tiles. * Also known as L-Infinity-Norm. * @param t0 the start tile * @param t1 the end tile * @return the distance */
| 199 | * @return the distance |
| 200 | */ |
| 201 | uint DistanceMax(TileIndex t0, TileIndex t1) |
| 202 | { |
| 203 | const uint dx = Delta(TileX(t0), TileX(t1)); |
| 204 | const uint dy = Delta(TileY(t0), TileY(t1)); |
| 205 | return std::max(dx, dy); |
| 206 | } |
| 207 | |
| 208 | |
| 209 | /** |
no test coverage detected