Stride Reference Manual
1.0
Main Page
Namespaces
Classes
Files
File List
File Members
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
}
stride::util::GeoCoordinate::m_longitude
double m_longitude
Definition:
GeoCoordinate.h:24
stride
Time Dependent Person DataType.
Definition:
NoBehaviour.h:17
stride::util::GeoCoordinate
Definition:
GeoCoordinate.h:12
stride::util::operator<
bool operator<(const GeoCoordinate &coord1, const GeoCoordinate &coord2)
Definition:
GeoCoordinate.cpp:11
std
STL namespace.
GeoCoordinate.h
stride::util::operator==
bool operator==(const GeoCoordinate &coord1, const GeoCoordinate &coord2)
Definition:
GeoCoordinate.cpp:7
util
stride::util::operator<<
std::ostream & operator<<(std::ostream &os, const GeoCoordinate &g)
Definition:
GeoCoordinate.cpp:21
stride::util::GeoCoordinate::m_latitude
double m_latitude
Definition:
GeoCoordinate.h:25
main
cpp
util
GeoCoordinate.cpp
Generated on Tue Jun 27 2017 15:38:18 for Stride Reference Manual by
1.8.11