* Returns the diff between two tiles * * @param tile_a from tile * @param tile_b to tile * @return the difference between tila_a and tile_b */
| 542 | * @return the difference between tila_a and tile_b |
| 543 | */ |
| 544 | inline TileIndexDiffC TileIndexToTileIndexDiffC(TileIndex tile_a, TileIndex tile_b) |
| 545 | { |
| 546 | TileIndexDiffC difference; |
| 547 | |
| 548 | difference.x = TileX(tile_a) - TileX(tile_b); |
| 549 | difference.y = TileY(tile_a) - TileY(tile_b); |
| 550 | |
| 551 | return difference; |
| 552 | } |
| 553 | |
| 554 | /* Functions to calculate distances */ |
| 555 | uint DistanceManhattan(TileIndex, TileIndex); ///< also known as L1-Norm. Is the shortest distance one could go over diagonal tracks (or roads) |
no test coverage detected