Debian Codegraph @

src/atlas/util/Constants.h

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 #pragma once
12
13 #include <cmath>
14
15 //------------------------------------------------------------------------------------------------------
16
17 namespace atlas {
18 namespace util {
19
20 //------------------------------------------------------------------------------------------------------
21
22 /// Some useful constants
23 struct Constants {
24 static constexpr double radiansToDegrees() { return 180. * M_1_PI; }
25 static constexpr double degreesToRadians() { return M_PI / 180.; }
26 };
27
28 //------------------------------------------------------------------------------------------------------
29
30 } // namespace util
31 } // namespace atlas