* Determines whether a given point (x, y) is within a certain distance of * the station rectangle. * @note x and y are in Tile coordinates * @param x X coordinate * @param y Y coordinate * @param distance The maximum distance a point may have (L1 norm) * @return true if the point is within distance tiles of the station rectangle */
| 562 | * @return true if the point is within distance tiles of the station rectangle |
| 563 | */ |
| 564 | bool StationRect::PtInExtendedRect(int x, int y, int distance) const |
| 565 | { |
| 566 | return this->left - distance <= x && x <= this->right + distance && |
| 567 | this->top - distance <= y && y <= this->bottom + distance; |
| 568 | } |
| 569 | |
| 570 | bool StationRect::IsEmpty() const |
| 571 | { |
no outgoing calls
no test coverage detected