League\Geotools\Vertex\Vertex::getOtherCoordinate PHP Метод

getOtherCoordinate() публичный Метод

Returns the other coordinate who is not the coordinate passed on argument
public getOtherCoordinate ( League\Geotools\Coordinate\CoordinateInterface $coordinate ) : null | Coordinate
$coordinate League\Geotools\Coordinate\CoordinateInterface
Результат null | League\Geotools\Coordinate\Coordinate
    public function getOtherCoordinate(CoordinateInterface $coordinate)
    {
        if ($coordinate->isEqual($this->from)) {
            return $this->to;
        } else {
            if ($coordinate->isEqual($this->to)) {
                return $this->from;
            }
        }
        return null;
    }