|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_TOOLS_GEODESY_GEO_COORDINATE_H_
2 #define GENESIS_UTILS_TOOLS_GEODESY_GEO_COORDINATE_H_
95 if( value < -90.0 || value > 90.0 ) {
96 throw std::invalid_argument(
"Latitude has to be in range [ -90.0, 90.0 ]." );
107 if( value < -180.0 || value > 180.0 ) {
108 throw std::invalid_argument(
"Longitude has to be in range [ -180.0, 180.0 ]." );
127 #endif // include guard
GeoCoordinate(double lat, double lon)
Geographical coordinates in degrees.
GeoCoordinate & longitude(double value)
Longitude, in range [ -180.0, 180.0 ].
GeoCoordinate & latitude(double value)
Latitude, in range [ -90.0, 90.0 ].
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
double latitude() const
Latitude, in range [ -90.0, 90.0 ].
GeoCoordinate & operator=(GeoCoordinate const &)=default
double longitude() const
Longitude, in range [ -180.0, 180.0 ].