Stride Reference Manual  1.0
GeoCoordinate.cpp
Go to the documentation of this file.
1 #include "util/GeoCoordinate.h"
2 
3 using namespace stride;
4 using namespace util;
5 using namespace std;
6 
7 bool stride::util::operator==(const GeoCoordinate& coord1, const GeoCoordinate& coord2) {
8  return coord1.m_latitude == coord2.m_latitude && coord1.m_longitude == coord2.m_longitude;
9 }
10 
11 bool stride::util::operator<(const GeoCoordinate& coord1, const GeoCoordinate& coord2) {
12  if (coord1.m_longitude < coord2.m_longitude) {
13  return true;
14  } else if (coord1.m_longitude > coord2.m_longitude) {
15  return false;
16  }
17 
18  return coord1.m_latitude < coord2.m_latitude;
19 }
20 
21 std::ostream& stride::util::operator<<(std::ostream& os, const GeoCoordinate& g) {
22  os << "(LATITUDE: " << g.m_latitude << ", LONGITUDE: " << g.m_longitude << ")";
23  return os;
24 }
Time Dependent Person DataType.
Definition: NoBehaviour.h:17
bool operator<(const GeoCoordinate &coord1, const GeoCoordinate &coord2)
STL namespace.
bool operator==(const GeoCoordinate &coord1, const GeoCoordinate &coord2)
std::ostream & operator<<(std::ostream &os, const GeoCoordinate &g)