@@ -27,174 +27,175 @@ namespace olp {
2727namespace geo {
2828
2929/* *
30- * @brief A geographic location using WGS84 coordinates .
30+ * @brief A geographic location that uses the WGS84 Coordinate System .
3131 *
32- * Latitude values range from 0 at equator to 90 degrees north and -90 degrees
33- * south. Longitude values range from 0 at prime meridian to 180 degrees
34- * eastwards and -180 degrees westwards .
32+ * Latitude values range from 0 at the equator to 90 degrees north and -90 degrees
33+ * south. Longitude values range from 0 at the prime meridian to 180 degrees
34+ * east and -180 degrees west .
3535 *
3636 * Internal representation of angles is radians.
3737 */
3838class CORE_API GeoCoordinates {
3939 public:
40- /* *
41- * @brief Construct default invalid geo coordinates.
42- */
40+ // / Creates a `GeoCoordinates` instance with invalid coordinates.
4341 GeoCoordinates ();
4442
4543 /* *
46- * @brief Construct geo coordinates form latitude and longitude.
44+ * @brief Creates a `GeoCoordinates` instance from latitude and longitude.
4745 *
48- * @param latitude_radians WGS84 latitude in radians. Valid values are in
49- * [-Pi/2, Pi/2] range.
50- * @param longitude_radians WGS84 longitude in radians. Valid values are in
51- * [-Pi, Pi) range. Use normalized() to put geo coordinate in a valid range.
46+ * @note Use `Normalized()` to put a coordinate in a valid range.
47+ *
48+ * @param latitude_radians The WGS84 latitude in radians. Valid values are in
49+ * the [-pi/2, pi/2] range.
50+ * @param longitude_radians The WGS84 longitude in radians. Valid values are in
51+ * the [-pi, pi] range.
5252 */
5353 GeoCoordinates (double latitude_radians, double longitude_radians);
5454
5555 /* *
56- * @brief Construct geo coordinates form latitude and longitude in degrees.
56+ * @brief Creates a `GeoCoordinates` instance from latitude and longitude.
57+ *
58+ * @note Use `Normalized()` to put a coordinate in a valid range.
5759 *
58- * @param latitude_degrees WGS84 latitude in degrees. Valid values are in
59- * [-90, 90] range.
60- * @param longitude_degrees WGS84 longitude in degrees. Valid values are in
61- * [-180, 180) range. Use normalized() to put geo coordinate in a valid range.
62- * @param degrees Dispatch tag for degree coordinates.
60+ * @param latitude_degrees The WGS84 latitude in degrees. Valid values are in
61+ * the [-90, 90] range.
62+ * @param longitude_degrees The WGS84 longitude in degrees. Valid values are in
63+ * the [-180, 180] range.
64+ * @param degrees The dispatch tag for coordinates in degrees .
6365 */
6466 GeoCoordinates (double latitude_degrees, double longitude_degrees,
6567 DegreeType degrees);
6668
6769 /* *
68- * @brief Create GeoCoordinates from latitude and longitude in degrees .
70+ * @brief Creates a ` GeoCoordinates` instance from latitude and longitude.
6971 *
70- * @param latitude_degrees WGS84 latitude in degrees. Valid value is in [-90,
71- * 90] range.
72- * @param longitude_degrees WGS84 longitude in degrees. Valid value is in
73- * [-180, 180) range.
72+ * @note Use `Normalized()` to put a value in a valid range.
7473 *
75- * @return GeoCoordinate based on specified input.
76- * Use normalized() to put values in a valid range.
74+ * @param latitude_degrees The WGS84 latitude in degrees. Valid values are in
75+ * the [-90, 90] range.
76+ * @param longitude_degrees The WGS84 longitude in degrees. Valid values are in
77+ * the [-180, 180] range.
78+ *
79+ * @return The `GeoCoordinates` instance based on the specified
80+ * latitude and longitude.
7781 */
7882 static GeoCoordinates FromDegrees (double latitude_degrees,
7983 double longitude_degrees);
8084
8185 /* *
82- * @brief Create GeoCoordinates from GeoPoint .
86+ * @brief Creates a ` GeoCoordinates` instance from a geo point .
8387 *
84- * @param geo_point Geo point to convert to .
88+ * @param geo_point The geo point .
8589 *
86- * @return GeoCoordinate based on specified geoPoint .
90+ * @return The `GeoCoordinates` instance based on the specified geo point .
8791 */
8892 static GeoCoordinates FromGeoPoint (const GeoPoint& geo_point);
8993
9094 /* *
91- * @brief Return geo coordinate as GeoPoint .
95+ * @brief Converts the current coordinates to a geo point .
9296 *
93- * @return current coordinate as a GeoPoint .
97+ * @return The current coordinates as a geo point .
9498 */
9599 GeoPoint ToGeoPoint () const ;
96100
97101 /* *
98- * @brief Return WGS84 latitude in radians.
102+ * @brief Gets the WGS84 latitude in radians.
99103 *
100- * @return WGS84 latitude in radians.
104+ * @return The WGS84 latitude in radians.
101105 */
102106 double GetLatitude () const ;
103107
104108 /* *
105- * @brief Set latitude in radians.
109+ * @brief Sets the latitude in radians.
106110 *
107- * @param latitude_radians WGS84 latitude in radians. Valid values are in
108- * [-Pi /2, Pi /2] range.
111+ * @param latitude_radians The WGS84 latitude in radians.
112+ * Valid values are in the [-pi /2, pi /2] range.
109113 */
110114 void SetLatitude (double latitude_radians);
111115
112116 /* *
113- * @brief Return WGS84 longitude in radians.
117+ * @brief Gets the WGS84 longitude in radians.
114118 *
115- * @return WGS84 longitude in radians.
119+ * @return The WGS84 longitude in radians.
116120 */
117121 double GetLongitude () const ;
118122
119123 /* *
120- * @brief Set longitude in radians.
121- * @param longitude_radians WGS84 longitude in radians. Valid values are in
122- * [-Pi, Pi) range.
124+ * @brief Sets the longitude in radians.
125+ *
126+ * @param longitude_radians The WGS84 longitude in radians.
127+ * Valid values are in the [-pi, pi] range.
123128 */
124129 void SetLongitude (double longitude_radians);
125130
126131 /* *
127- * @brief Return WGS84 latitude in degrees.
132+ * @brief Gets the WGS84 latitude in degrees.
128133 *
129- * @return WGS84 latitude in degrees.
134+ * @return The WGS84 latitude in degrees.
130135 */
131136 double GetLatitudeDegrees () const ;
132137
133138 /* *
134- * @brief Set latitude in degrees.
139+ * @brief Sets the latitude in degrees.
135140 *
136- * @param latitude_degrees WGS84 latitude in degrees. Valid values are in
137- * [-90, 90] range.
141+ * @param latitude_degrees The WGS84 latitude in degrees.
142+ * Valid values are in the [-90, 90] range.
138143 */
139144 void SetLatitudeDegrees (double latitude_degrees);
140145
141146 /* *
142- * @brief Return WGS84 longitude in degrees.
147+ * @brief Gets the WGS84 longitude in degrees.
143148 *
144- * @return WGS84 longitude in degrees.
149+ * @return The WGS84 longitude in degrees.
145150 */
146151 double GetLongitudeDegrees () const ;
147152
148153 /* *
149- * @brief Set longitude in degrees.
154+ * @brief Sets the longitude in degrees.
150155 *
151- * @param longitude_degrees WGS84 longitude in degrees. Valid values are in
152- * [-180, 180) range.
156+ * @param longitude_degrees The WGS84 longitude in degrees.
157+ * Valid values are in the [-180, 180] range.
153158 */
154159 void SetLongitudeDegrees (double longitude_degrees);
155160
156161 /* *
157- * @brief Normalize the latitude and longitude to [-Pi/2, Pi/2], [-Pi, Pi)
158- * range.
159- *
160- * To that end, longitude wraps around at +/- Pi and latitude is clamped at
161- * +/- Pi/2.
162+ * @brief Normalizes the latitude and longitude to
163+ * the [-pi/2, pi/2] and [-pi, pi] ranges correspondingly.
162164 */
163165 GeoCoordinates Normalized () const ;
164166
165167 /* *
166- * @brief Overload the bool operator.
168+ * @brief Overloads the bool operator.
167169 *
168- * Returns true if the coordinates are valid.
170+ * @see `IsValid`
169171 *
170- * @see IsValid
172+ * @return True if the coordinates are valid; false otherwise.
171173 */
172174 explicit operator bool () const ;
173175
174176 /* *
175- * @brief Check if the radian values of latitude and longitude are valid
176- * double numbers.
177+ * @brief Checks whether the radian values of latitude and longitude
178+ * are valid double numbers.
177179 *
178- * The check happens with the help of math::isnan.
180+ * The check happens with the help of ` math::isnan` .
179181 *
180- * @return true if the result of the check is positive,
181- * false if it is negative.
182+ * @return True if the result of the check is positive; false otherwise.
182183 */
183184 bool IsValid () const ;
184185
185186 private:
186- // / Latitude in radians.
187+ // / The latitude in radians.
187188 double latitude_;
188- // / Longitude in radians.
189+ // / The longitude in radians.
189190 double longitude_;
190- // / Const used to signalize an invalid value latitude or longitude.
191+ // / The const that signalizes an invalid value of latitude or longitude.
191192 static const double kNaN_ ;
192193};
193194
194195/* *
195- * @brief Compare operator for comparing two coordinates with each other .
196+ * @brief Checks whether two coordinates are equal .
196197 *
197- * @return true if the two GeoCoordinates are equal, false otherwise.
198+ * @return True if the coordinates are equal; false otherwise.
198199 */
199200CORE_API bool operator ==(const GeoCoordinates& lhs, const GeoCoordinates& rhs);
200201
0 commit comments