Debian Codegraph @

src/atlas/util/Point.cc

raw
1 /*
2 * (C) Copyright 2013 ECMWF.
3 *
4 * This software is licensed under the terms of the Apache Licence Version 2.0
5 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6 * In applying this licence, ECMWF does not waive the privileges and immunities
7 * granted to it by virtue of its status as an intergovernmental organisation
8 * nor does it submit to any jurisdiction.
9 */
10
11 #include "atlas/util/Point.h"
12 #include "atlas/util/NormaliseLongitude.h"
13
14 namespace atlas {
15
16 void PointLonLat::normalise() {
17 constexpr util::NormaliseLongitude normalize_from_zero;
18 lon() = normalize_from_zero(lon());
19 }
20
21 void PointLonLat::normalise(double west) {
22 util::NormaliseLongitude normalize_from_west(west);
23 lon() = normalize_from_west(lon());
24 }
25
26 void PointLonLat::normalise(double west, double east) {
27 util::NormaliseLongitude normalize_between_west_and_east(west, east);
28 lon() = normalize_between_west_and_east(lon());
29 }
30
31 } // namespace atlas