* Compute Manhattan distance between two points. * @param x1 X coordinate first point. * @param y1 Y coordinate first point. * @param x2 X coordinate second point. * @param y2 Y coordinate second point. * @return Manhattan distance between both points. */
| 518 | * @return Manhattan distance between both points. |
| 519 | */ |
| 520 | int Micropolis::getDistance(int x1, int y1, int x2, int y2) |
| 521 | { |
| 522 | return absoluteValue(x1 - x2) + absoluteValue(y1 - y2); |
| 523 | } |
| 524 | |
| 525 | |
| 526 | /** |
nothing calls this directly
no test coverage detected