Пример #1
0
bool City::operator <(const City &_city)const{

	if(m_name < _city.name())
		return true;
	if (m_name>_city.name())
		return false;
	if (m_country_id < _city.country_id())
		return true;
	if (m_country_id>_city.country_id())
		return false;
	if (GeoGraphyUtils::less_than(longitude(), _city.longitude()))
		return true;
	if (GeoGraphyUtils::greater_than(longitude(), _city.longitude()))
		return false;
	if (GeoGraphyUtils::less_than(latitude(), _city.latitude()))
		return true;
	if (GeoGraphyUtils::greater_than(latitude(), _city.latitude()))
		return false;
	return false;

}
Пример #2
0
float City::distance(const City &_city)const{

	return distance(_city.latitude(), _city.longitude());

}